summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/synaptics.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@gnu.org>2010-09-30 03:53:35 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-10-13 16:49:23 +0200
commit6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 (patch)
tree3ab25c521042133a27f9875ad1d366e4b44ad68f /drivers/input/mouse/synaptics.c
parentInput: emu10k1 - do not leave device enabled when probe fails (diff)
downloadlinux-6792cbbb254712a8c0fa8a4c97c8d521c7c41c28.tar.xz
linux-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/synaptics.c')
-rw-r--r--drivers/input/mouse/synaptics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 96b70a43515f..a79bc362dde5 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -731,7 +731,7 @@ int synaptics_init(struct psmouse *psmouse)
psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL);
if (!priv)
- return -1;
+ return -ENOMEM;
psmouse_reset(psmouse);