Skip to content

Commit 68d85d0

Browse files
Wei YongjunWolfram Sang
authored andcommitted
i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare
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>
1 parent 93d710a commit 68d85d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i2c/busses/i2c-digicolor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static int dc_i2c_probe(struct platform_device *pdev)
347347

348348
ret = i2c_add_adapter(&i2c->adap);
349349
if (ret < 0) {
350-
clk_unprepare(i2c->clk);
350+
clk_disable_unprepare(i2c->clk);
351351
return ret;
352352
}
353353

0 commit comments

Comments
 (0)