提交 f3b11449 编写于 作者: Z Zhang Changzhong 提交者: Jakub Kicinski

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: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 05891200
...@@ -129,8 +129,7 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv) ...@@ -129,8 +129,7 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv)
{ {
struct imx_priv_data *dwmac = 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); clk_disable_unprepare(dwmac->clk_mem);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册