diff mbox

input:kxtj9:check the return value of kxtj9_enable()

Message ID 1311144502-16932-1-git-send-email-gaowanlong@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wanlong Gao July 20, 2011, 6:48 a.m. UTC
If don't check the return value of kxtj9_enable(), the kxtj9_resume()
will always return 0 instead.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
 drivers/input/misc/kxtj9.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index a416f7f..b835c29 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -627,7 +627,7 @@  static int kxtj9_resume(struct device *dev)
 	mutex_lock(&input_dev->mutex);
 
 	if (input_dev->users)
-		kxtj9_enable(tj9);
+		retval = kxtj9_enable(tj9);
 
 	mutex_unlock(&input_dev->mutex);
 	return retval;