input: trackpoint: return proper error value
Subsystems (2)
PATCH 1/1 input: trackpoint: return proper error value
From: Davidlohr Bueso <[email protected]>
If sysfs_create_group() returns an error, we should return it in trackpoint_detect(), instead of -1.
Signed-off-by Davidlohr Bueso <[email protected]>
--- drivers/input/mouse/trackpoint.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/mouse/trackpoint.c +1 -1
@@ -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",
Signature · 1 line
1.7.1
Dmitry Torokhov
maintainerQuoted 14 lines · Davidlohr Bueso
From: Davidlohr Bueso <[email protected]>
If
sysfs_create_group()returns an error, we should return it intrackpoint_detect(), instead of -1.Signed-off-by Davidlohr Bueso <[email protected]>--- drivers/input/mouse/trackpoint.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/input/mouse/trackpoint.c +0
-0
drivers/input/mouse/trackpoint.c int trackpoint_detect(struct psmouse *psmouse, bool set_properties) · line 327
Quoted 5 lines
drivers/input/mouse/trackpoint.c +1
-1@@ -324,7 +324,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties) error);kfree (psmouse->private); psmouse->private =NULL ; -return -1 ; +return error;
This is not the only place where we return -1 in place of proper error code in that driver. Care to update all of them?
Thanks.
Signature · 1 line
Dmitry