]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i2c: s3c2410: Add missing clock unprepare on probe() error path
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 21 Apr 2016 07:04:49 +0000 (09:04 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 25 Apr 2016 22:27:13 +0000 (00:27 +0200)
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>
drivers/i2c/busses/i2c-s3c2410.c

index 1bc756313cb8e4de3e7021a2be1df7ec8ede0b7c..3f16f30edbd263d793c29b20343aabac526ad9c7 100644 (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