This reverts commit 34cf2acdafaa31a13821e45de5ee896adcd307b1. 'ret' is not set when bailing out. Also, there is a better place to check for 0.
Unified · Split
| @@ -770,7 +770,7 @@ static int jz4780_i2c_probe(struct platform_device *pdev) · 769 unmodified lines | |||
| 770 | 770 | ||
| 771 | ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency", | 771 | ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency", |
| 772 | &clk_freq); | 772 | &clk_freq); |
| 773 | if (ret || clk_freq == 0) { | 773 | if (ret) { |
| 774 | dev_err(&pdev->dev, "clock-frequency not specified in DT"); | 774 | dev_err(&pdev->dev, "clock-frequency not specified in DT"); |
| 775 | goto err; | 775 | goto err; |
| 776 | } | 776 | } |