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 <[email protected]>
Acked-by: Baruch Siach <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
Wei Yongjun 2016-10-29 16:31:17 +00:00 • committed by Wolfram Sang
commit 68d85d0e03

View 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;
}