Skip to contentSkip to conversation

Renesas: propagate platform_get_irq() error upstream

PATCH Applied Sergei Shtylyov 3 participants 7 messages Aug 28, 2015 – Aug 29, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Renesas: propagate platform_get_irq() error upstream

Hello.

Here's 2 patches against DaveM's 'net.git' repo. We fix error handling for
platform_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

#1 lore raw

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;

Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] ravb: propagate platform_get_irq() error upstream

Quoted 5 lines · Sergei Shtylyov

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.

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

#4 lore raw

PATCH 2/2 sh_eth: propagate platform_get_irq() error upstream

In reply to Sergei Shtylyov

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/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);

Acked-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] sh_eth: propagate platform_get_irq() error upstream

Quoted 5 lines · Sergei Shtylyov

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.

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

maintainer Applied
#6 lore raw

Re: [PATCH 2/2] sh_eth: propagate platform_get_irq() error upstream

In reply to Sergei Shtylyov

From: 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 -ENODEV which e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead.

Applied.