From: Wei Yongjun Date: Wed, 16 Oct 2013 06:37:44 +0000 (-0700) Subject: Input: nspire-keypad - add missing clk_disable_unprepare() on error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a4da47527d9f2e19a66527379418a5d13de9fff1;p=linux-beck.git 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 --- 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; }