lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] input: trackpoint: return proper error value
From
Date
From: Davidlohr Bueso <dave@gnu.org>

If sysfs_create_group() returns an error, we should return it in trackpoint_detect(), instead of -1.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
drivers/input/mouse/trackpoint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
index 54b2fa8..e8b7c3f 100644
--- a/drivers/input/mouse/trackpoint.c
+++ b/drivers/input/mouse/trackpoint.c
@@ -324,7 +324,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
error);
kfree(psmouse->private);
psmouse->private = NULL;
- return -1;
+ return error;
}

printk(KERN_INFO "IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n",
--
1.7.1




\
 
 \ /
  Last update: 2011-01-20 15:49    [W:0.038 / U:75.180 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site