diff options
author | Davidlohr Bueso <dave@gnu.org> | 2010-09-29 21:53:35 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-10-13 10:49:23 -0400 |
commit | 6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 (patch) | |
tree | 3ab25c521042133a27f9875ad1d366e4b44ad68f /drivers/input/mouse/trackpoint.c | |
parent | 7aed3fb73f4ac7912ce9e0c232a15ee012bf4be5 (diff) |
Input: return -ENOMEM in select drivers when memory allocation fails
Instead of using -1 let's start using proper error codes.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/trackpoint.c')
-rw-r--r-- | 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 0643e49ca603..54b2fa892e19 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c | |||
@@ -303,7 +303,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties) | |||
303 | 303 | ||
304 | psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL); | 304 | psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL); |
305 | if (!psmouse->private) | 305 | if (!psmouse->private) |
306 | return -1; | 306 | return -ENOMEM; |
307 | 307 | ||
308 | psmouse->vendor = "IBM"; | 308 | psmouse->vendor = "IBM"; |
309 | psmouse->name = "TrackPoint"; | 309 | psmouse->name = "TrackPoint"; |