All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: ohci-pxa27x: propagate the irq error code
@ 2016-02-13 22:10 Robert Jarzmik
  2016-02-18 18:40 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Jarzmik @ 2016-02-13 22:10 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Robert Jarzmik

In several drivers in the pxa architecture, it was found that the
platform_get_irq() was not propagated. This breaks the the device-tree
probe deferral path, if -EPROBE_DEFER is returned. Unfortunately, the
error return in this case is transformed into -ENXIO, breaking the
deferral mechanism.

Even if in this specific case the driver was not broken, because the
interrupt controller is always probed before drivers, propagate the
proper return code.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/usb/host/ohci-pxa27x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index e8c006e7a960..a667cf2d5788 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -435,7 +435,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		pr_err("no resource of IORESOURCE_IRQ");
-		return -ENXIO;
+		return irq;
 	}
 
 	usb_clk = devm_clk_get(&pdev->dev, NULL);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: host: ohci-pxa27x: propagate the irq error code
  2016-02-13 22:10 [PATCH] usb: host: ohci-pxa27x: propagate the irq error code Robert Jarzmik
@ 2016-02-18 18:40 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2016-02-18 18:40 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On Sat, 13 Feb 2016, Robert Jarzmik wrote:

> In several drivers in the pxa architecture, it was found that the
> platform_get_irq() was not propagated. This breaks the the device-tree
> probe deferral path, if -EPROBE_DEFER is returned. Unfortunately, the
> error return in this case is transformed into -ENXIO, breaking the
> deferral mechanism.
> 
> Even if in this specific case the driver was not broken, because the
> interrupt controller is always probed before drivers, propagate the
> proper return code.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>

Acked-by: Alan Stern <stern@rowland.harvard.edu>

> ---
>  drivers/usb/host/ohci-pxa27x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
> index e8c006e7a960..a667cf2d5788 100644
> --- a/drivers/usb/host/ohci-pxa27x.c
> +++ b/drivers/usb/host/ohci-pxa27x.c
> @@ -435,7 +435,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		pr_err("no resource of IORESOURCE_IRQ");
> -		return -ENXIO;
> +		return irq;
>  	}
>  
>  	usb_clk = devm_clk_get(&pdev->dev, NULL);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-18 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 22:10 [PATCH] usb: host: ohci-pxa27x: propagate the irq error code Robert Jarzmik
2016-02-18 18:40 ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.