aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elantech.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@gnu.org>2010-09-29 18:53:35 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-10-13 07:49:23 -0700
commit6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 (patch)
tree3ab25c521042133a27f9875ad1d366e4b44ad68f /drivers/input/mouse/elantech.c
parentInput: emu10k1 - do not leave device enabled when probe fails (diff)
downloadlinux-dev-6792cbbb254712a8c0fa8a4c97c8d521c7c41c28.tar.xz
linux-dev-6792cbbb254712a8c0fa8a4c97c8d521c7c41c28.zip
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/elantech.c')
-rw-r--r--drivers/input/mouse/elantech.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 48311204ba51..04d9bf320a4f 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -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++)