Skip to contentSkip to conversation

remoteproc: stm32_rproc: Propagate errors from optional IRQ lookup

PATCH In review [email protected] 3 participants 6 messages Aug 10 – Sep 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: stm32_rproc: Propagate errors from optional IRQ lookup

From: bui duc phuc <[email protected]>

platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no IRQ is available, while other errors should be propagated.

Instead of only checking for -EPROBE_DEFER, propagate all error codes returned by platform_get_irq_optional() other than -ENXIO, so that failures are properly reported to the caller.

---
 drivers/remoteproc/stm32_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/stm32_rproc.c +1 -1
index 632614013dc6..9301e1dab830 100644
@@ -705,7 +705,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
 	int err, irq;
 
 	irq = platform_get_irq_optional(pdev, 0);
-	if (irq == -EPROBE_DEFER)
+	if (irq < 0 && irq != -ENXIO)
 		return irq;
 
 	if (irq > 0) {
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 7 lines · On Sun, 9 Aug 2026 at 23:19, <[email protected]> wrote:

From: bui duc phuc <[email protected]>

platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no IRQ is available, while other errors should be propagated.

Quoted 9 lines

Instead of only checking for -EPROBE_DEFER, propagate all error codes returned by platform_get_irq_optional() other than -ENXIO, so that failures are properly reported to the caller.

---
 drivers/remoteproc/stm32_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I'll pick this up when rc1 comes out.

Thanks,
Mathieu

Quoted 16 lines
drivers/remoteproc/stm32_rproc.c +1 -2
index 632614013dc6..9301e1dab830 100644
@@ -705,7 +705,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
        int err, irq;
 
        irq = platform_get_irq_optional(pdev, 0);
-       if (irq == -EPROBE_DEFER)
+       if (irq < 0 && irq != -ENXIO)
                return irq;
 
        if (irq > 0) {
--

2.43.0

#2 lore raw

Hi Mathieu,

Thank you for your feedback.

Quoted 3 lines

I'll pick this up when rc1 comes out.

Thanks, I’ll wait for rc1.

Best regards,
Phuc

Acked-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 11 lines · On 8/10/26 07:19, [email protected] wrote:

From: bui duc phuc <[email protected]>

platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no IRQ is available, while other errors should be propagated.

Instead of only checking for -EPROBE_DEFER, propagate all error codes returned by platform_get_irq_optional() other than -ENXIO, so that failures are properly reported to the caller.

Thanks!
Arnaud

Quoted 17 lines
---
  drivers/remoteproc/stm32_rproc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/stm32_rproc.c +1 -1
index 632614013dc6..9301e1dab830 100644
@@ -705,7 +705,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
  	int err, irq;
 
  	irq = platform_get_irq_optional(pdev, 0);
-	if (irq == -EPROBE_DEFER)
+	if (irq < 0 && irq != -ENXIO)
  		return irq;
 
  	if (irq > 0) {
#5 lore raw
Quoted 5 lines · Bui Duc Phuc

Hi Arnaud,

Thank you for the Acked-by tag!

Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I noticed that the tag is missing the angle brackets around your email address. I'll fix that and send v2 shortly.

Thanks for correcting my copy-paste mistakes!

Arnaud

Quoted 3 lines

Best regards,
Phuc