Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] Input: nspire-keypad - add missing clk_disable_unprepare() on error path
@ 2013-10-12  6:32 Wei Yongjun
  2013-10-16  6:55 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-10-12  6:32 UTC (permalink / raw)
  To: dmitry.torokhov, grant.likely, rob.herring, dt.tangr, yongjun_wei,
	Julia.Lawall, viresh.kumar
  Cc: linux-input

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-16  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-12  6:32 [PATCH] Input: nspire-keypad - add missing clk_disable_unprepare() on error path Wei Yongjun
2013-10-16  6:55 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox