Input: nspire-keypad - add missing clk_disable_unprepare() on error path
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 16 Oct 2013 06:37:44 +0000 (23:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 16 Oct 2013 06:42:11 +0000 (23:42 -0700)
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>
drivers/input/keyboard/nspire-keypad.c

index 9981928..b310649 100644 (file)
@@ -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;
 }