i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 29 Oct 2016 16:31:17 +0000 (16:31 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 18 Nov 2016 00:48:01 +0000 (01:48 +0100)
since clk_prepare_enable() is used to get i2c->clk, we should
use clk_disable_unprepare() to release it for the error path.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-digicolor.c

index 49f2084f7bb501a9d36d1698b46c11478beed1bb..50813a24c541d216ee32f53e8b52fbde6ab09b5c 100644 (file)
@@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev)
 
        ret = i2c_add_adapter(&i2c->adap);
        if (ret < 0) {
-               clk_unprepare(i2c->clk);
+               clk_disable_unprepare(i2c->clk);
                return ret;
        }