* [PATCH] gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
@ 2026-06-30 14:51 Vladimir Zapolskiy
2026-07-01 7:21 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2026-06-30 14:51 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski; +Cc: Richard Röjfors, linux-gpio
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 <vz@kernel.org>
---
drivers/gpio/gpio-timberdale.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 78fe133f5d32..ec378a4220a7 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -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;
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-01 7:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 14:51 [PATCH] gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe Vladimir Zapolskiy
2026-07-01 7:21 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox