Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333374 > unrolled thread

[PATCH] usb: host: ohci-pxa27x: propagate the irq error code

Started byRobert Jarzmik <robert.jarzmik@free.fr>
First post2016-02-13 23:20 +0100
Last post2016-02-18 19:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] usb: host: ohci-pxa27x: propagate the irq error code Robert Jarzmik <robert.jarzmik@free.fr> - 2016-02-13 23:20 +0100
    Re: [PATCH] usb: host: ohci-pxa27x: propagate the irq error code Alan Stern <stern@rowland.harvard.edu> - 2016-02-18 19:50 +0100

#1333374 — [PATCH] usb: host: ohci-pxa27x: propagate the irq error code

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2016-02-13 23:20 +0100
Subject[PATCH] usb: host: ohci-pxa27x: propagate the irq error code
Message-ID<r1QHL-2mm-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1337619

FromAlan Stern <stern@rowland.harvard.edu>
Date2016-02-18 19:50 +0100
Message-ID<r3BOi-1ky-9@gated-at.bofh.it>
In reply to#1333374
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);
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web