diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-11-11 22:23:50 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-11-14 18:57:32 +0100 |
commit | 2dc9688a106886db7191d30f30ffd61fde827efd (patch) | |
tree | 6d1a6a1801ef4200260aeb94586ab856ccd54d5d /drivers/i2c | |
parent | 25b3dfc87bff80317d67ddd2cd4cfb91e6fe7d79 (diff) | |
download | linux-2dc9688a106886db7191d30f30ffd61fde827efd.tar.bz2 |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org # 3.11+
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-wmt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c index c65da3d913a0..4bf9507cd1a1 100644 --- a/drivers/i2c/busses/i2c-wmt.c +++ b/drivers/i2c/busses/i2c-wmt.c @@ -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; } |