diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-09-07 20:46:54 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-09-07 13:34:51 -0700 |
commit | f3b11449a46a8c7844eb3c2b337206a692d897e0 (patch) | |
tree | 9c1704992be99798149016f7574dcf1365f0c282 /drivers/net/ethernet/stmicro | |
parent | 05891200706117895b7faac7e53b14118b6a8114 (diff) |
net: ethernet: dwmac: 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: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c index 3c5df5eeed6c..efef5476a577 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c @@ -129,8 +129,7 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv) { struct imx_priv_data *dwmac = priv; - if (dwmac->clk_tx) - clk_disable_unprepare(dwmac->clk_tx); + clk_disable_unprepare(dwmac->clk_tx); clk_disable_unprepare(dwmac->clk_mem); } |