Skip to contentSkip to conversation

media: rkvdec: Propagate platform_get_irq() errors

PATCH In review Narasimharao Vadlamudi 2 participants 2 messages Jul 1 – Jul 2

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

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

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

Return the error from platform_get_irq() directly.

Fixes cd33c830448b ("media: rkvdec: Add the rkvdec driver")
---
 drivers/media/platform/rockchip/rkvdec/rkvdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/rockchip/rkvdec/rkvdec.c +2 -2
index 1d1e9bfef8e9..37683a6bb40f 100644
@@ -1818,8 +1818,8 @@ static int rkvdec_probe(struct platform_device *pdev)
 	vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0)
-		return -ENXIO;
+	if (irq < 0)
+		return irq;
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 					rkvdec_irq_handler, IRQF_ONESHOT,
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Vadlamudi,

Quoted 19 lines · On Wednesday, July 1, 2026 7:12:03 a.m. Eastern Daylight Time Narasimharao…

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

Return the error from platform_get_irq() directly.

Fixes cd33c830448b ("media: rkvdec: Add the rkvdec driver")
---
 drivers/media/platform/rockchip/rkvdec/rkvdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/media/platform/rockchip/rkvdec/rkvdec.c index 1d1e9bfef8e9..37683a6bb40f 100644

drivers/media/platform/rockchip/rkvdec/rkvdec.c static int rkvdec_probe(struct platform_device *pdev) · line 1825

Quoted 10 lines
drivers/media/platform/rockchip/rkvdec/rkvdec.c +2 -2
@@ -1818,8 +1818,8 @@ static int rkvdec_probe(struct platform_device *pdev)
 	vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0)
-		return -ENXIO;
+	if (irq < 0)
+		return irq;
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 					rkvdec_irq_handler, 

IRQF_ONESHOT,

Thank you for the patch ! And sorry for the HTML email before. So for the record:

--
Detlev.