mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
i2c: wmt: add missing clk_disable_unprepare() on error
Add the missing clk_disable_unprepare() before return from wmt_i2c_reset_hardware() in the error handling case. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Cc: [email protected] # 3.11+
This commit is contained in:
parent
25b3dfc87b
commit
2dc9688a10
1 changed files with 1 additions and 0 deletions
|
|
@ -349,6 +349,7 @@ static int wmt_i2c_reset_hardware(struct wmt_i2c_dev *i2c_dev)
|
|||
err = clk_set_rate(i2c_dev->clk, 20000000);
|
||||
if (err) {
|
||||
dev_err(i2c_dev->dev, "failed to set clock = 20Mhz\n");
|
||||
clk_disable_unprepare(i2c_dev->clk);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue