diff mbox series

[3/4] usb: host: ehci-sh: propagate errors from platform_get_irq()

Message ID 20211214204247.7172-4-s.shtylyov@omp.ru (mailing list archive)
State Accepted
Commit 1aebf115afd730d1e0f773b8273b04b8681e1128
Headers show
Series Propagate errors from platform_get_irq() in the USB drivers | expand

Commit Message

Sergey Shtylyov Dec. 14, 2021, 8:42 p.m. UTC
The driver overrides the error codes and IRQ0 returned by platform_get_irq()
to -ENODEV.  Switch to propagating the error codes upstream.  IRQ0 is no
longer returned by platform_get_irq(), so we now can safely ignore it...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ehci-sh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alan Stern Dec. 14, 2021, 9:04 p.m. UTC | #1
On Tue, Dec 14, 2021 at 11:42:46PM +0300, Sergey Shtylyov wrote:
> The driver overrides the error codes and IRQ0 returned by platform_get_irq()
> to -ENODEV.  Switch to propagating the error codes upstream.  IRQ0 is no
> longer returned by platform_get_irq(), so we now can safely ignore it...
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---

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

>  drivers/usb/host/ehci-sh.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c
> index c25c51d26f26..882231b5c382 100644
> --- a/drivers/usb/host/ehci-sh.c
> +++ b/drivers/usb/host/ehci-sh.c
> @@ -82,8 +82,8 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		ret = -ENODEV;
> +	if (irq < 0) {
> +		ret = irq;
>  		goto fail_create_hcd;
>  	}
>  
> -- 
> 2.26.3
>
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c
index c25c51d26f26..882231b5c382 100644
--- a/drivers/usb/host/ehci-sh.c
+++ b/drivers/usb/host/ehci-sh.c
@@ -82,8 +82,8 @@  static int ehci_hcd_sh_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		ret = -ENODEV;
+	if (irq < 0) {
+		ret = irq;
 		goto fail_create_hcd;
 	}