Renesas: propagate platform_get_irq() error upstream
Subsystems (3)
cover Renesas: propagate platform_get_irq() error upstream
Hello.
Here's 2 patches against DaveM's 'net.git' repo. We fix error handling forplatform_get_irq() that overrides the error code with -ENODEV which e.g. prevents the deferred probing from working.
[1/2] ravb: propagate platform_get_irq() error upstream [2/2] sh_eth: propagate platform_get_irq() error upstream
MBR, Sergei
PATCH 1/2 ravb: propagate platform_get_irq() error upstream
The driver overrides the error returned by platform_get_irq() with -ENODEV which e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.
--- drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: net/drivers/net/ethernet/renesas/ravb_main.c =================================--- net.orig/drivers/net/ethernet/renesas/ravb_main.c +++ net/drivers/net/ethernet/renesas/ravb_main.c
@@ -1643,7 +1643,7 @@ static int ravb_probe(struct platform_de
ndev->dma = -1;
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- error = -ENODEV;
+ error = irq;
goto out_release;
}
ndev->irq = irq;
PATCH 2/2 sh_eth: propagate platform_get_irq() error upstream
In reply to Sergei ShtylyovThe driver overrides the error returned by platform_get_irq() with -ENODEV which e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.
--- drivers/net/ethernet/renesas/sh_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Index: net/drivers/net/ethernet/renesas/sh_eth.c =================================--- net.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -3089,10 +3089,8 @@ static int sh_eth_drv_probe(struct platf
ndev->dma = -1;
ret = platform_get_irq(pdev, 0);
- if (ret < 0) {
- ret = -ENODEV;
+ if (ret < 0)
goto out_release;
- }
ndev->irq = ret;
SET_NETDEV_DEV(ndev, &pdev->dev);
Re: [PATCH 1/2] ravb: propagate platform_get_irq() error upstream
In reply to Sergei ShtylyovQuoted 5 lines · Sergei Shtylyov
The driver overrides the error returned by
platform_get_irq()with-ENODEVwhich e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.Signed-off-by Sergei Shtylyov <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 2/2] sh_eth: propagate platform_get_irq() error upstream
In reply to Sergei ShtylyovQuoted 5 lines · Sergei Shtylyov
The driver overrides the error returned by
platform_get_irq()with-ENODEVwhich e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.Signed-off-by Sergei Shtylyov <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 1/2] ravb: propagate platform_get_irq() error upstream
In reply to Sergei ShtylyovFrom: Sergei Shtylyov <[email protected]>
Date: Fri, 28 Aug 2015 16:55:10 +0300
Quoted 5 lines
The driver overrides the error returned by
platform_get_irq()with-ENODEVwhich e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.Signed-off-by Sergei Shtylyov <[email protected]>
Applied.
Re: [PATCH 2/2] sh_eth: propagate platform_get_irq() error upstream
In reply to Sergei ShtylyovFrom: Sergei Shtylyov <[email protected]>
Date: Fri, 28 Aug 2015 16:56:01 +0300
Quoted 5 lines
The driver overrides the error returned by
platform_get_irq()with-ENODEVwhich e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.Signed-off-by Sergei Shtylyov <[email protected]>
Applied.