diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-09-09 17:09:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-10 00:17:02 +0300 |
commit | 6b5472d4f1588e3eea0c3270ec53766739ae4c2e (patch) | |
tree | f9080ec4b0c2876f2ba9dd938b627ff9c7fcaf89 /drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | |
parent | a0d48518cdc855ed188be385abb4df1752a4003c (diff) | |
download | linux-6b5472d4f1588e3eea0c3270ec53766739ae4c2e.tar.xz |
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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c index ccac7bf2a9d3..b1323d5c95b5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c @@ -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; } |