History

Revert "i2c: jz4780: prevent potential division by zero"

This reverts commit 34cf2acdafaa31a13821e45de5ee896adcd307b1. 'ret' is not set when bailing out. Also, there is a better place to check for 0.

Wolfram Sang committed 10 years ago

Commit 4ececb71 parent 34cf2ac1 file · +1 −1Browse files

Unified · Split

drivers/i2c/busses/i2c-jz4780.c+1−1
@@ -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 }