提交 440f895a 编写于 作者: C Christophe Jaillet 提交者: David S. Miller

drivers: net: phy: xgene: Fix 'remove' function

If 'IS_ERR(pdata->clk)' is true, then 'clk_disable_unprepare(pdata->clk)'
will do nothing.

It is likely that 'if (!IS_ERR(pdata->clk))' was expected here.
In fact, the test can even be removed because 'clk_disable_unprepare'
already handles such cases.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 715f5552
......@@ -424,10 +424,8 @@ static int xgene_mdio_remove(struct platform_device *pdev)
mdiobus_unregister(mdio_bus);
mdiobus_free(mdio_bus);
if (dev->of_node) {
if (IS_ERR(pdata->clk))
clk_disable_unprepare(pdata->clk);
}
if (dev->of_node)
clk_disable_unprepare(pdata->clk);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册