Message ID | 1311757847-23132-1-git-send-email-tklauser@distanz.ch (mailing list archive) |
---|---|
State | Accepted |
Commit | 1f4bb066433322f6f189b084ceebdfb4add77292 |
Headers | show |
On Wed, Jul 27, 2011 at 11:10:47AM +0200, Tobias Klauser wrote: > Return -ENOMEM if kzalloc fails in gpio_keys_get_devtree_pdata. > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Applied, thanks Tobias.
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;
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(-)