Commit 6b5472d4 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by David S. Miller

net: stmmac: dwmac-intel-plat: remove redundant null check before clk_disable_unprepare()

Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0d48518
......@@ -149,9 +149,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret) {
if (dwmac->tx_clk)
clk_disable_unprepare(dwmac->tx_clk);
clk_disable_unprepare(dwmac->tx_clk);
goto err_remove_config_dt;
}
......@@ -169,9 +167,7 @@ static int intel_eth_plat_remove(struct platform_device *pdev)
int ret;
ret = stmmac_pltfr_remove(pdev);
if (dwmac->tx_clk)
clk_disable_unprepare(dwmac->tx_clk);
clk_disable_unprepare(dwmac->tx_clk);
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