diff mbox series

[2/4] usb: gadget: udc: pxa25x: propagate errors from platform_get_irq()

Message ID 20211214204247.7172-3-s.shtylyov@omp.ru (mailing list archive)
State Accepted
Commit 12ba912c30477481cb50158bc5ca0318f41a1762
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 returned by platform_get_irq() to
-ENODEV for some strange reason.  Switch to propagating the error codes
upstream.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Mack Dec. 17, 2021, 10:32 a.m. UTC | #1
On 12/14/21 21:42, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENODEV for some strange reason.  Switch to propagating the error codes
> upstream.
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>

Acked-by: Daniel Mack <daniel@zonque.org>

Greg, could you take this through your tree?


Best,
Daniel



> ---
>  drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
> index 52cdfd8212d6..b38747fd3bb0 100644
> --- a/drivers/usb/gadget/udc/pxa25x_udc.c
> +++ b/drivers/usb/gadget/udc/pxa25x_udc.c
> @@ -2364,7 +2364,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
>  
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0)
> -		return -ENODEV;
> +		return irq;
>  
>  	dev->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(dev->regs))
>
Greg KH Dec. 17, 2021, 11:11 a.m. UTC | #2
On Fri, Dec 17, 2021 at 11:32:58AM +0100, Daniel Mack wrote:
> On 12/14/21 21:42, Sergey Shtylyov wrote:
> > The driver overrides the error codes returned by platform_get_irq() to
> > -ENODEV for some strange reason.  Switch to propagating the error codes
> > upstream.
> > 
> > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> 
> Acked-by: Daniel Mack <daniel@zonque.org>
> 
> Greg, could you take this through your tree?

Will do, thanks!

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 52cdfd8212d6..b38747fd3bb0 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -2364,7 +2364,7 @@  static int pxa25x_udc_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -ENODEV;
+		return irq;
 
 	dev->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(dev->regs))