Skip to content

Commit

Permalink
net: ethernet: dwmac: remove redundant null check before clk_disable_…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Zhang Changzhong authored and Jakub Kicinski committed Sep 7, 2020
1 parent 0589120 commit f3b1144
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f3b1144

Please sign in to comment.