Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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;
}
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;
}