diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-16 02:37:44 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-10-16 02:42:11 -0400 |
commit | a4da47527d9f2e19a66527379418a5d13de9fff1 (patch) | |
tree | 0f98e83c67e26e80e2b8af49fa931ed53a361aa1 /drivers/input | |
parent | 1ccd33b8f69f9df7f11b0ec08259058164831ca5 (diff) |
Input: nspire-keypad - add missing clk_disable_unprepare() on error path
Add the missing clk_disable_unprepare() before return
from nspire_keypad_open() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/nspire-keypad.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index 9981928234cd..b31064981e96 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c | |||
@@ -143,8 +143,10 @@ static int nspire_keypad_open(struct input_dev *input) | |||
143 | return error; | 143 | return error; |
144 | 144 | ||
145 | error = nspire_keypad_chip_init(keypad); | 145 | error = nspire_keypad_chip_init(keypad); |
146 | if (error) | 146 | if (error) { |
147 | clk_disable_unprepare(keypad->clk); | ||
147 | return error; | 148 | return error; |
149 | } | ||
148 | 150 | ||
149 | return 0; | 151 | return 0; |
150 | } | 152 | } |