Skip to content

Commit

Permalink
net: mvpp2: Fix error return code in mvpp2_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Jul 21, 2014
1 parent 468f864 commit 575a193
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/mvpp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 575a193

Please sign in to comment.