aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2016-04-21 03:04:49 -0400
committerWolfram Sang <wsa@the-dreams.de>2016-04-25 18:27:13 -0400
commitb1b3df2fc808187e3c9e50162b55fb458035b0ab (patch)
tree23f0093aca04907e42ddde41411662f7f26549db
parent4729cbe038fdd321839d7780ee93ce1ccf1e7b29 (diff)
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 <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c1
1 files changed, 1 insertions, 0 deletions
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)
1200 clk_disable(i2c->clk); 1200 clk_disable(i2c->clk);
1201 if (ret != 0) { 1201 if (ret != 0) {
1202 dev_err(&pdev->dev, "I2C controller init failed\n"); 1202 dev_err(&pdev->dev, "I2C controller init failed\n");
1203 clk_unprepare(i2c->clk);
1203 return ret; 1204 return ret;
1204 } 1205 }
1205 /* find the IRQ for this unit (note, this relies on the init call to 1206 /* find the IRQ for this unit (note, this relies on the init call to