Browse Source

net/macb: fix error return code in macb_probe()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Original-idea-by: <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Ferre 12 years ago
parent
commit
72ca820bdb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/net/ethernet/cadence/macb.c

+ 2 - 2
drivers/net/ethernet/cadence/macb.c

@@ -1602,9 +1602,9 @@ static int __init macb_probe(struct platform_device *pdev)
 		goto err_out_free_irq;
 	}
 
-	if (macb_mii_init(bp) != 0) {
+	err = macb_mii_init(bp);
+	if (err)
 		goto err_out_unregister_netdev;
-	}
 
 	platform_set_drvdata(pdev, dev);