Commit 1f4bb066 authored by Tobias Klauser's avatar Tobias Klauser Committed by Dmitry Torokhov

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: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 52db9819
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment