diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-11-11 22:23:50 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-04 11:05:11 -0800 |
commit | 5b13b578a4a0e7dce4f20f3ab79a00c78623f47c (patch) | |
tree | 1ceabc8b669ad487ed3ef5d83830b43d630a2838 /drivers/i2c | |
parent | 9a81ddfc4c131cfcc3fc5a7517ea3b1eb38dd796 (diff) | |
download | lwn-5b13b578a4a0e7dce4f20f3ab79a00c78623f47c.tar.gz lwn-5b13b578a4a0e7dce4f20f3ab79a00c78623f47c.zip |
i2c: wmt: add missing clk_disable_unprepare() on error
commit 2dc9688a106886db7191d30f30ffd61fde827efd upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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; } |