From: Krzysztof Kozlowski Date: Thu, 21 Apr 2016 07:04:49 +0000 (+0200) Subject: i2c: s3c2410: Add missing clock unprepare on probe() error path X-Git-Tag: v4.7-rc1~113^2~28 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b1b3df2fc808187e3c9e50162b55fb458035b0ab;p=karo-tx-linux.git i2c: s3c2410: Add missing clock unprepare on probe() error path If during probe() the s3c24xx_i2c_init() failed, the clock was left in disabled but prepared state. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 1bc756313cb8..3f16f30edbd2 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1200,6 +1200,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) clk_disable(i2c->clk); if (ret != 0) { dev_err(&pdev->dev, "I2C controller init failed\n"); + clk_unprepare(i2c->clk); return ret; } /* find the IRQ for this unit (note, this relies on the init call to