Skip to contentSkip to conversation

remoteproc: stm32_rproc: Propagate errors from optional IRQ lookup

PATCH New [email protected] 1 participant 1 message Sep 4

Subsystems (2)

v2 of 3 New Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

---

Changes in v2:
- Add Arnaud Pouliquen's Acked-by tag.

 drivers/remoteproc/stm32_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/stm32_rproc.c +1 -1
index 1fe4cdc0a13a..a47e040c6db8 100644
@@ -675,7 +675,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