Skip to content

Commit 58f6032

Browse files
dinghaoliukuba-moo
authored andcommitted
net: ethernet: mvneta: Fix error handling in mvneta_probe
When mvneta_port_power_up() fails, we should execute cleanup functions after label err_netdev to avoid memleak. Fixes: 41c2b6b ("net: ethernet: mvneta: Add back interface mode validation") Signed-off-by: Dinghao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a0c8be5 commit 58f6032

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5255,7 +5255,7 @@ static int mvneta_probe(struct platform_device *pdev)
52555255
err = mvneta_port_power_up(pp, pp->phy_interface);
52565256
if (err < 0) {
52575257
dev_err(&pdev->dev, "can't power up port\n");
5258-
return err;
5258+
goto err_netdev;
52595259
}
52605260

52615261
/* Armada3700 network controller does not support per-cpu

0 commit comments

Comments
 (0)