Commit 23aa6d50 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net: stmmac: fix leaks in probe

These two error paths should clean up before returning.

Fixes: 2bb4b98b ("net: stmmac: Add Ingenic SoCs MAC support.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49b9f431
......@@ -273,7 +273,8 @@ static int ingenic_mac_probe(struct platform_device *pdev)
mac->tx_delay = tx_delay_ps * 1000;
} else {
dev_err(&pdev->dev, "Invalid TX clock delay: %dps\n", tx_delay_ps);
return -EINVAL;
ret = -EINVAL;
goto err_remove_config_dt;
}
}
......@@ -283,7 +284,8 @@ static int ingenic_mac_probe(struct platform_device *pdev)
mac->rx_delay = rx_delay_ps * 1000;
} else {
dev_err(&pdev->dev, "Invalid RX clock delay: %dps\n", rx_delay_ps);
return -EINVAL;
ret = -EINVAL;
goto err_remove_config_dt;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment