diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-07-30 21:08:10 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-30 21:19:02 +0200 |
commit | 1f4bb066433322f6f189b084ceebdfb4add77292 (patch) | |
tree | 2c3876f2a2f6db9c58137373e22f250bd58337ef /drivers/input/keyboard/gpio_keys.c | |
parent | Input: lm8323 - add missing device_remove_file for dev_attr_time (diff) | |
download | linux-1f4bb066433322f6f189b084ceebdfb4add77292.tar.xz linux-1f4bb066433322f6f189b084ceebdfb4add77292.zip |
Input: gpio_keys - return proper error code if memory allocation fails
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>
Diffstat (limited to 'drivers/input/keyboard/gpio_keys.c')
-rw-r--r-- | 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 ce281d152275..67df91af8424 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; |