From: Wei Yongjun Date: Sun, 20 Jul 2014 14:02:43 +0000 (+0800) Subject: net: mvpp2: Fix error return code in mvpp2_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=575a19354c80fde236382755592256d30d2a27fb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }