提交 76e597eb 编写于 作者: Y YueHaibing 提交者: David S. Miller

net: ethoc: Remove useless test before clk_disable_unprepare

clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Reviewed-by: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 93120eba
...@@ -1246,7 +1246,6 @@ static int ethoc_probe(struct platform_device *pdev) ...@@ -1246,7 +1246,6 @@ static int ethoc_probe(struct platform_device *pdev)
mdiobus_unregister(priv->mdio); mdiobus_unregister(priv->mdio);
mdiobus_free(priv->mdio); mdiobus_free(priv->mdio);
free2: free2:
if (priv->clk)
clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk);
free: free:
free_netdev(netdev); free_netdev(netdev);
...@@ -1271,7 +1270,6 @@ static int ethoc_remove(struct platform_device *pdev) ...@@ -1271,7 +1270,6 @@ static int ethoc_remove(struct platform_device *pdev)
mdiobus_unregister(priv->mdio); mdiobus_unregister(priv->mdio);
mdiobus_free(priv->mdio); mdiobus_free(priv->mdio);
} }
if (priv->clk)
clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk);
unregister_netdev(netdev); unregister_netdev(netdev);
free_netdev(netdev); free_netdev(netdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册