From 6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Wed, 29 Sep 2010 18:53:35 -0700 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/mouse/elantech.c') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 48311204ba5..04d9bf320a4 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++) -- cgit v1.2.3