diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2016-04-09 08:32:37 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-09 08:32:37 +0200 |
commit | 4ececb7d173f17c60c00e704a0e4e51cdf788e04 (patch) | |
tree | 2e045896e94632621f8107db1f6bd639754ae0f4 /drivers | |
parent | 34cf2acdafaa31a13821e45de5ee896adcd307b1 (diff) | |
download | linux-stable-4ececb7d173f17c60c00e704a0e4e51cdf788e04.tar.gz linux-stable-4ececb7d173f17c60c00e704a0e4e51cdf788e04.tar.bz2 linux-stable-4ececb7d173f17c60c00e704a0e4e51cdf788e04.zip |
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.
Reported-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-jz4780.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c index 597408fc6834..f325663c27c5 100644 --- a/drivers/i2c/busses/i2c-jz4780.c +++ b/drivers/i2c/busses/i2c-jz4780.c @@ -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; } |