mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue