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
@@ -699,7 +699,7 @@ int elantech_init(struct psmouse *psmouse)
|
||||
|
||||
psmouse->private = etd = kzalloc(sizeof(struct elantech_data), GFP_KERNEL);
|
||||
if (!etd)
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
|
||||
etd->parity[0] = 1;
|
||||
for (i = 1; i < 256; i++)
|
||||
|
Reference in New Issue
Block a user