gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
PATCH 1/1 gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
Out of memory situation on driver's probe is expected to be reported to the driver's framework with a proper -ENOMEM error code.
Fixes 35570ac6039e ("gpio: add GPIO driver for the Timberdale FPGA")
Signed-off-by Vladimir Zapolskiy <[email protected]>
--- drivers/gpio/gpio-timberdale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-timberdale.c +1 -1
@@ -228,7 +228,7 @@ static int timbgpio_probe(struct platform_device *pdev) tgpio =devm_kzalloc (dev,sizeof (*tgpio),GFP_KERNEL );if (!tgpio) -return -EINVAL ; +return -ENOMEM ; gc = &tgpio->gpio;
Signature · 1 line
2.51.0
Bartosz Golaszewski
AppliedQuoted 4 lines · Vladimir Zapolskiy
Out of memory situation on driver's probe is expected to be reported to the driver's framework with a proper
-ENOMEMerror code.
Applied, thanks!
[1/1] gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
https://git.kernel.org/brgl/c/8d7e62d5e9b2d2ff146f472a9215d7e29c7e2307
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>