Skip to content

Commit bd59cfc

Browse files
rjarzmikdavem330
authored andcommitted
net: smc91x: propagate irq return code
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>
1 parent bfb3a9d commit bd59cfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/smsc/smc91x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,8 +2342,8 @@ static int smc_drv_probe(struct platform_device *pdev)
23422342
}
23432343

23442344
ndev->irq = platform_get_irq(pdev, 0);
2345-
if (ndev->irq <= 0) {
2346-
ret = -ENODEV;
2345+
if (ndev->irq < 0) {
2346+
ret = ndev->irq;
23472347
goto out_release_io;
23482348
}
23492349
/*

0 commit comments

Comments
 (0)