mirror of https://gitee.com/openkylin/linux.git
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: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
04606ccc84
commit
f64622167f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue