summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/nspire-keypad.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-16 10:37:44 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-10-16 10:42:11 +0400
commita4da47527d9f2e19a66527379418a5d13de9fff1 (patch)
tree0f98e83c67e26e80e2b8af49fa931ed53a361aa1 /drivers/input/keyboard/nspire-keypad.c
parent1ccd33b8f69f9df7f11b0ec08259058164831ca5 (diff)
downloadlinux-a4da47527d9f2e19a66527379418a5d13de9fff1.tar.xz
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/keyboard/nspire-keypad.c')
-rw-r--r--drivers/input/keyboard/nspire-keypad.c4
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)
return error;
error = nspire_keypad_chip_init(keypad);
- if (error)
+ if (error) {
+ clk_disable_unprepare(keypad->clk);
return error;
+ }
return 0;
}