Commit f6462216 authored by Arvind Yadav's avatar Arvind Yadav Committed by Wolfram Sang

i2c: emev2: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 04606ccc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment