* [PATCH] Input: gpio_keys - Return proper error code
@ 2011-07-27 9:10 Tobias Klauser
2011-07-30 19:08 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2011-07-27 9:10 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
Return -ENOMEM if kzalloc fails in gpio_keys_get_devtree_pdata.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/input/keyboard/gpio_keys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ce281d1..67df91a 100644
--- 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 -ENODEV;
+ return -ENOMEM;
pp = NULL;
i = 0;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-30 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27 9:10 [PATCH] Input: gpio_keys - Return proper error code Tobias Klauser
2011-07-30 19:08 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).