mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: pisp_be: Propagate platform_get_irq() errors
@ 2026-06-30 12:34 Narasimharao Vadlamudi
  2026-11-27  2:27 ` Roy
  0 siblings, 1 reply; 2+ messages in thread
From: Narasimharao Vadlamudi @ 2026-06-30 12:34 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: Raspberry Pi Kernel Maintenance, Mauro Carvalho Chehab,
	Florian Fainelli, Broadcom internal kernel review list,
	linux-media, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Narasimharao Vadlamudi

platform_get_irq() returns a non-zero IRQ number on success and a
negative error code on failure. The driver currently returns -EINVAL
for all failures, which loses useful errors such as -EPROBE_DEFER.

Return the error from platform_get_irq() directly.

Fixes: 12187bd5d4f8 ("media: raspberrypi: Add support for PiSP BE")
Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
---
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
index d60d92d2ffa1..06644d10ace0 100644
--- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
+++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
@@ -1703,8 +1703,8 @@ static int pispbe_probe(struct platform_device *pdev)
 	}
 
 	pispbe->irq = platform_get_irq(pdev, 0);
-	if (pispbe->irq <= 0)
-		return -EINVAL;
+	if (pispbe->irq < 0)
+		return pispbe->irq;
 
 	ret = devm_request_irq(&pdev->dev, pispbe->irq, pispbe_isr, 0,
 			       PISPBE_NAME, pispbe);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: pisp_be: Propagate platform_get_irq() errors
  2026-06-30 12:34 [PATCH] media: pisp_be: Propagate platform_get_irq() errors Narasimharao Vadlamudi
@ 2026-11-27  2:27 ` Roy
  0 siblings, 0 replies; 2+ messages in thread
From: Roy @ 2026-11-27  2:27 UTC (permalink / raw)
  To: Narasimharao Vadlamudi
  Cc: Jacopo Mondi, Raspberry Pi Kernel Maintenance,
	Mauro Carvalho Chehab, Florian Fainelli,
	Broadcom internal kernel review list, linux-media,
	linux-rpi-kernel, linux-arm-kernel, linux-kernel

On Tue, 30 Jun 2026 18:04:52 +0530, Narasimharao Vadlamudi wrote:
> Return the error from platform_get_irq() directly.

I tested this on a Raspberry Pi 5 (Raspberry Pi OS kernel 6.18.39),
together with the other two pending pisp_be probe/prepare fixes
("Initialize lock before requesting IRQ" and "check configuration
buffer CPU mappings"), by rebuilding the pisp_be module.

The driver probes normally, unloading and reloading the module 20 times
works, v4l2-compliance -m on the pispbe media device passes 400/400
before and after the reloads, and there are no new kernel messages. I
couldn't exercise the platform_get_irq() error path itself.

Tested-by: Roy <rongh7426@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-27  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 12:34 [PATCH] media: pisp_be: Propagate platform_get_irq() errors Narasimharao Vadlamudi
2026-11-27  2:27 ` Roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®