diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-24 19:31:06 +0530 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-06-19 22:18:55 +0200 |
commit | f64622167f4aa5124fed264d481509829d34e126 (patch) | |
tree | 403db2fa26421ef7892566a33d92a7165384822f /drivers/i2c | |
parent | 04606ccc84e3c799ede8ad19fe0409c5a4892cc4 (diff) |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-emev2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c index 312912708854..d2e84480fbe9 100644 --- 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; |