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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
Wei Yongjun 2013-10-15 23:37:44 -07:00 • committed by Dmitry Torokhov
commit a4da47527d

View 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;
}