Message ID | CAPgLHd9f_4-mtxXKLcL+fiNJw8gdTjU8ZSJtJoSLTW2tSa-N_Q@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Oct 12, 2013 at 02:32:09PM +0800, Wei Yongjun wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > 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> Applied, thank you. > --- > drivers/input/keyboard/nspire-keypad.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c > index b3e3eda..85e8d80 100644 > --- a/drivers/input/keyboard/nspire-keypad.c > +++ b/drivers/input/keyboard/nspire-keypad.c > @@ -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; > } >
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index b3e3eda..85e8d80 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -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; }