Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ececb7d authored by Wolfram Sang's avatar Wolfram Sang
Browse files

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



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

Reported-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 34cf2acd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -770,7 +770,7 @@ static int jz4780_i2c_probe(struct platform_device *pdev)

	ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency",
				   &clk_freq);
	if (ret || clk_freq == 0) {
	if (ret) {
		dev_err(&pdev->dev, "clock-frequency not specified in DT");
		goto err;
	}