Skip to contentSkip to conversation

uio: fsl_elbc_gpcm: preserve platform_get_irq() errors

PATCH New Diego Fernando Mancera Gomez 1 participant 1 message Sep 4 Userspace I/O (UIO)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uio: fsl_elbc_gpcm: preserve platform_get_irq() errors

In uio_fsl_elbc_gpcm_probe(), platform_get_irq() returns a negative errno on failure. Because irq is declared as unsigned int, the error check if (irq < 0) is never satisfied and negative error codes (such as -EPROBE_DEFER) bypass the error handling.

Change the local irq declaration from unsigned int to int so negative errors from platform_get_irq() reach the error check and are properly returned.

Fixes c8295feb756f ("uio: fsl_elbc_gpcm: use platform helpers for resource and IRQ")
---
 drivers/uio/uio_fsl_elbc_gpcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/uio/uio_fsl_elbc_gpcm.c +1 -1
index 08cb150fb12f..e6394dd14e43 100644
@@ -303,7 +303,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)
 	char *uio_name = NULL;
 	struct resource *res;
 	void __iomem *base;
-	unsigned int irq;
+	int irq;
 	u32 reg_br_cur;
 	u32 reg_or_cur;
 	u32 reg_br_new;
Signature · 1 line
2.55.0