Skip to content

Commit

Permalink
Input: nspire-keypad - add missing clk_disable_unprepare() on error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Dmitry Torokhov committed Oct 16, 2013
1 parent 1ccd33b commit a4da475
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/input/keyboard/nspire-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a4da475

Please sign in to comment.