Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;