projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04606cc
)
i2c: emev2: Handle return value of clk_prepare_enable
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Wed, 24 May 2017 14:01:06 +0000
(19:31 +0530)
committer
Wolfram Sang
<wsa@the-dreams.de>
Mon, 19 Jun 2017 20:18:55 +0000
(22:18 +0200)
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-emev2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/busses/i2c-emev2.c
b/drivers/i2c/busses/i2c-emev2.c
index 3129127088542728e2f2e73993a956f2d589800a..d2e84480fbe96093549666df92a55f4f7196259f 100644
(file)
--- a/
drivers/i2c/busses/i2c-emev2.c
+++ b/
drivers/i2c/busses/i2c-emev2.c
@@
-375,7
+375,9
@@
static int em_i2c_probe(struct platform_device *pdev)
if (IS_ERR(priv->sclk))
return PTR_ERR(priv->sclk);
- clk_prepare_enable(priv->sclk);
+ ret = clk_prepare_enable(priv->sclk);
+ if (ret)
+ return ret;
priv->adap.timeout = msecs_to_jiffies(100);
priv->adap.retries = 5;