From 575a19354c80fde236382755592256d30d2a27fb Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 20 Jul 2014 22:02:43 +0800 Subject: [PATCH] net: mvpp2: Fix error return code in mvpp2_probe() Fix to return -ENODEV from the no ports enabled error handling case instead of 0. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- drivers/net/ethernet/marvell/mvpp2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index f8e1953aeb59..4f6e4a1400e7 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c @@ -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; } -- 2.30.2