mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
1ccd33b8f6
commit
a4da47527d
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue