Skip to contentSkip to conversation

media: pisp_be: Propagate platform_get_irq() errors

PATCH New Narasimharao Vadlamudi 1 participant 1 message Jun 30

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

PATCH 1/1 media: pisp_be: Propagate platform_get_irq() errors

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")
---
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +2 -2
index d60d92d2ffa1..06644d10ace0 100644
@@ -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);
Signature · 1 line
2.43.0