OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52db981
)
Input: gpio_keys - return proper error code if memory allocation fails
author
Tobias Klauser
<tklauser@distanz.ch>
Sat, 30 Jul 2011 19:08:10 +0000
(12:08 -0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Sat, 30 Jul 2011 19:19:02 +0000
(12:19 -0700)
Return -ENOMEM if kzalloc fails in gpio_keys_get_devtree_pdata().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/keyboard/gpio_keys.c
patch
|
blob
|
history
diff --git
a/drivers/input/keyboard/gpio_keys.c
b/drivers/input/keyboard/gpio_keys.c
index
ce281d1
..
67df91a
100644
(file)
--- a/
drivers/input/keyboard/gpio_keys.c
+++ b/
drivers/input/keyboard/gpio_keys.c
@@
-483,7
+483,7
@@
static int gpio_keys_get_devtree_pdata(struct device *dev,
buttons = kzalloc(pdata->nbuttons * (sizeof *buttons), GFP_KERNEL);
if (!buttons)
- return -ENO
DEV
;
+ return -ENO
MEM
;
pp = NULL;
i = 0;