From a4da47527d9f2e19a66527379418a5d13de9fff1 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 15 Oct 2013 23:37:44 -0700 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/nspire-keypad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/input/keyboard') diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index 9981928234c..b31064981e9 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; } -- cgit v1.2.3-70-g09d2