net: mvpp2: Fix error return code in mvpp2_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 20 Jul 2014 14:02:43 +0000 (22:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2014 05:26:58 +0000 (22:26 -0700)
Fix to return -ENODEV from the no ports enabled error handling
case instead of 0.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c

index f8e1953aeb597526ca383c9e6019b7e020b52dd8..4f6e4a1400e7c4b8e132a2202f3adad903879bd5 100644 (file)
@@ -6307,6 +6307,7 @@ static int mvpp2_probe(struct platform_device *pdev)
        port_count = of_get_available_child_count(dn);
        if (port_count == 0) {
                dev_err(&pdev->dev, "no ports enabled\n");
+               err = -ENODEV;
                goto err_gop_clk;
        }