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>
This commit is contained in:
Krzysztof Kozlowski 2016-04-21 09:04:49 +02:00 committed by Wolfram Sang
parent 4729cbe038
commit b1b3df2fc8

View File

@ -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