mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 03:30:53 +07:00
Revert "i2c: jz4780: prevent potential division by zero"
This reverts commit 34cf2acdaf
. 'ret' is
not set when bailing out. Also, there is a better place to check for 0.
Reported-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
34cf2acdaf
commit
4ececb7d17
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user