Commit 9bc58060 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Jakub Kicinski

net: stmmac: dwmac-qcom-ethqos: rename a label in probe()

The err_mem label's name is unclear. It actually should be reached on
any error after stmmac_probe_config_dt() succeeds. Name it after the
cleanup action that needs to be called before exiting.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9fc68f23
...@@ -615,14 +615,14 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ...@@ -615,14 +615,14 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL); ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL);
if (!ethqos) { if (!ethqos) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_mem; goto out_config_dt;
} }
ethqos->pdev = pdev; ethqos->pdev = pdev;
ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii");
if (IS_ERR(ethqos->rgmii_base)) { if (IS_ERR(ethqos->rgmii_base)) {
ret = PTR_ERR(ethqos->rgmii_base); ret = PTR_ERR(ethqos->rgmii_base);
goto err_mem; goto out_config_dt;
} }
data = of_device_get_match_data(&pdev->dev); data = of_device_get_match_data(&pdev->dev);
...@@ -634,16 +634,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ...@@ -634,16 +634,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii"); ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
if (IS_ERR(ethqos->rgmii_clk)) { if (IS_ERR(ethqos->rgmii_clk)) {
ret = PTR_ERR(ethqos->rgmii_clk); ret = PTR_ERR(ethqos->rgmii_clk);
goto err_mem; goto out_config_dt;
} }
ret = ethqos_clks_config(ethqos, true); ret = ethqos_clks_config(ethqos, true);
if (ret) if (ret)
goto err_mem; goto out_config_dt;
ret = devm_add_action_or_reset(&pdev->dev, ethqos_clks_disable, ethqos); ret = devm_add_action_or_reset(&pdev->dev, ethqos_clks_disable, ethqos);
if (ret) if (ret)
goto err_mem; goto out_config_dt;
ethqos->speed = SPEED_1000; ethqos->speed = SPEED_1000;
ethqos_update_rgmii_clk(ethqos, SPEED_1000); ethqos_update_rgmii_clk(ethqos, SPEED_1000);
...@@ -662,11 +662,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ...@@ -662,11 +662,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret) if (ret)
goto err_mem; goto out_config_dt;
return ret; return ret;
err_mem: out_config_dt:
stmmac_remove_config_dt(pdev, plat_dat); stmmac_remove_config_dt(pdev, plat_dat);
return ret; return ret;
......
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