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>
This commit is contained in:

committed by
Dmitry Torokhov

parent
7aed3fb73f
commit
6792cbbb25
@@ -303,7 +303,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
|
||||
|
||||
psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL);
|
||||
if (!psmouse->private)
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
|
||||
psmouse->vendor = "IBM";
|
||||
psmouse->name = "TrackPoint";
|
||||
|
Reference in New Issue
Block a user