From: Robert Jarzmik Date: Sat, 6 Feb 2016 21:23:20 +0000 (+0100) Subject: net: smc91x: propagate irq return code X-Git-Tag: v4.9.8~2654^2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd59cfc51df7ddc88755a60a1293cee55f5d0a12;p=platform%2Fkernel%2Flinux-rpi3.git 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 Cc: Sergei Shtylyov Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 0e2fc1a..db7db8a 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -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; } /*