Skip to content

Commit

Permalink
net: smc91x: propagate irq return code
Browse files Browse the repository at this point in the history
The smc91x driver doesn't honor the probe deferral mechanism when the
interrupt source is not yet available, such as one provided by a gpio
controller not probed.

Fix this by propagating the platform_get_irq() error code as the probe
return value.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Robert Jarzmik authored and David S. Miller committed Feb 16, 2016
1 parent bfb3a9d commit bd59cfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/smsc/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2342,8 +2342,8 @@ static int smc_drv_probe(struct platform_device *pdev)
}

ndev->irq = platform_get_irq(pdev, 0);
if (ndev->irq <= 0) {
ret = -ENODEV;
if (ndev->irq < 0) {
ret = ndev->irq;
goto out_release_io;
}
/*
Expand Down

0 comments on commit bd59cfc

Please sign in to comment.