summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2021-01-20 12:07:44 +0100
committerJakub Kicinski <kuba@kernel.org>2021-01-23 03:25:36 +0100
commit3765d86ffcd346913c372d69cdc05dc8d56119ac (patch)
tree4388bc5caa22206b14e0ad5ac10d0a3a23e143a6
parentnet: octeontx2: Make sure the buffer is 128 byte aligned (diff)
downloadlinux-3765d86ffcd346913c372d69cdc05dc8d56119ac.tar.xz
linux-3765d86ffcd346913c372d69cdc05dc8d56119ac.zip
net: stmmac: dwmac-intel-plat: remove config data on error
Remove the config data when rate setting fails. Fixes: 9efc9b2b04c7 ("net: stmmac: Add dwmac-intel-plat for GBE driver") Signed-off-by: Pan Bian <bianpan2016@163.com> Link: https://lore.kernel.org/r/20210120110745.36412-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
index 82b1c7a5a7a9..ba0e4d2b256a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -129,7 +129,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev,
"Failed to set tx_clk\n");
- return ret;
+ goto err_remove_config_dt;
}
}
}
@@ -143,7 +143,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev,
"Failed to set clk_ptp_ref\n");
- return ret;
+ goto err_remove_config_dt;
}
}
}