Message ID | 20211214204247.7172-5-s.shtylyov@omp.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | 4de5bd9a389d886d2f58ad15512f476ffc7d639d |
Headers | show |
Series | Propagate errors from platform_get_irq() in the USB drivers | expand |
On Tue, Dec 14, 2021 at 11:42:47PM +0300, Sergey Shtylyov wrote: > The driver overrides the error codes returned by platform_get_irq() to > -ENXIO for some strange reason. Switch to propagating the error codes > upstream. > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> > --- Acked-by: Alan Stern <stern@rowland.harvard.edu> > drivers/usb/host/ohci-omap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c > index ded9738392e4..45dcf8292072 100644 > --- a/drivers/usb/host/ohci-omap.c > +++ b/drivers/usb/host/ohci-omap.c > @@ -306,7 +306,7 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev) > > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > - retval = -ENXIO; > + retval = irq; > goto err3; > } > retval = usb_add_hcd(hcd, irq, 0); > -- > 2.26.3 >
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index ded9738392e4..45dcf8292072 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -306,7 +306,7 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - retval = -ENXIO; + retval = irq; goto err3; } retval = usb_add_hcd(hcd, irq, 0);
The driver overrides the error codes returned by platform_get_irq() to -ENXIO for some strange reason. Switch to propagating the error codes upstream. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- drivers/usb/host/ohci-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)