浏览代码

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>
Robert Jarzmik 9 年之前
父节点
当前提交
bd59cfc51d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/net/ethernet/smsc/smc91x.c

+ 2 - 2
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;
 	}
 	/*