]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/macb: fix error return code in macb_probe()
authorNicolas Ferre <nicolas.ferre@atmel.com>
Sun, 14 Apr 2013 22:04:33 +0000 (22:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2013 18:09:37 +0000 (14:09 -0400)
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>
drivers/net/ethernet/cadence/macb.c

index 7fd0e3e977af451df57f0a0a20237c323456fcbf..6be513deb17f69b73be4b321821e99d3ec7a17cd 100644 (file)
@@ -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);