diff mbox series

[07/10] usb: host: ohci-da8xx: fix deferred probing

Message ID 20211021191437.8737-8-s.shtylyov@omp.ru (mailing list archive)
State Superseded
Headers show
Series Fix deferred probing in the USB host/gadget drivers | expand

Commit Message

Sergey Shtylyov Oct. 21, 2021, 7:14 p.m. UTC
From: Sergey Shtylyov <s.shtylyov@omprussia.ru>

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV 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: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergey Shtylyov Oct. 21, 2021, 7:17 p.m. UTC | #1
On 10/21/21 10:14 PM, Sergey Shtylyov wrote:

> From: Sergey Shtylyov <s.shtylyov@omprussia.ru>

   Oops, should have been @omp.ru -- missed it somehow... :-?

> The driver overrides the error codes returned by platform_get_irq() to
> -ENODEV 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: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

   Hm, this needs fixing too...

> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]

MBR, Sergey
Greg Kroah-Hartman Oct. 22, 2021, 9:08 a.m. UTC | #2
On Thu, Oct 21, 2021 at 10:17:43PM +0300, Sergey Shtylyov wrote:
> On 10/21/21 10:14 PM, Sergey Shtylyov wrote:
> 
> > From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
> 
>    Oops, should have been @omp.ru -- missed it somehow... :-?
> 
> > The driver overrides the error codes returned by platform_get_irq() to
> > -ENODEV 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: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
> > Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
> 
>    Hm, this needs fixing too...
> 
> > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> [...]

Please fix up and add Alan's acks and send a v2 of this series.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 6d08ab2bf163..8eceb6a92fe9 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -446,7 +446,7 @@  static int ohci_da8xx_probe(struct platform_device *pdev)
 
 	hcd_irq = platform_get_irq(pdev, 0);
 	if (hcd_irq < 0) {
-		error = -ENODEV;
+		error = hcd_irq;
 		goto err;
 	}
 	if (!hcd_irq) {