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>
This commit is contained in:
parent
93d710a65e
commit
68d85d0e03
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user