diff mbox series

[v3,5/6] usb: host: ohci-nxp: fix deferred probing

Message ID 20211210204634.8182-6-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
-ENXIO for some strange reason, 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.

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
---
Changes in version 3:
- corrected the "Fixes:" tag;
- added Alan's and Vladimir's ACKs.

Changes in version 2:
- refreshed the patch;
- removed the eliipsis in the patch description.

 drivers/usb/host/ohci-nxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index 85878e8ad331..a84c5e714372 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -212,7 +212,7 @@  static int ohci_hcd_nxp_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		ret = -ENXIO;
+		ret = irq;
 		goto fail_resource;
 	}