diff mbox series

[v3,6/6] usb: musb: core: fix deferred probing

Message ID 20211210204634.8182-7-s.shtylyov@omp.ru (mailing list archive)
State New, archived
Headers show
Series Fix deferred probing in the USB host/gadget drivers | expand

Commit Message

Sergey Shtylyov Dec. 10, 2021, 8:46 p.m. UTC
The driver overrides the error codes returned by platform_get_irq() to
-ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe
permanently instead of the deferred probing. Switch to propagating the
error codes upstream. IRQ0 is no longer returned by platform_get_irq(),
so we now can safely ignore it...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
Changes in version 3:
- corrected the "Fixes:" tag.

Changes in version 2:
- updated the patch description on treating IRQ0.

 drivers/usb/musb/musb_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f7b1d5993f8c..e57abc54d12b 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2618,8 +2618,8 @@  static int musb_probe(struct platform_device *pdev)
 	int		irq = platform_get_irq_byname(pdev, "mc");
 	void __iomem	*base;
 
-	if (irq <= 0)
-		return -ENODEV;
+	if (irq < 0)
+		return irq;
 
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))