提交 1f4bb066 编写于 作者: T Tobias Klauser 提交者: 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: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册