Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-07-01  7:21 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Vladimir Zapolskiy
  Cc: Bartosz Golaszewski, Richard Röjfors, linux-gpio


On Tue, 30 Jun 2026 17:51:48 +0300, Vladimir Zapolskiy wrote:
> Out of memory situation on driver's probe is expected to be reported to
> the driver's framework with a proper -ENOMEM error code.
> 
> 

Applied, thanks!

[1/1] gpio: timberdale: Return -ENOMEM on dynamic memory allocation in probe
      https://git.kernel.org/brgl/c/8d7e62d5e9b2d2ff146f472a9215d7e29c7e2307

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[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