Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4da4752 authored by Wei Yongjun's avatar Wei Yongjun Committed by Dmitry Torokhov
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 1ccd33b8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}