Commit 76e597eb authored by YueHaibing's avatar YueHaibing Committed by 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: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93120eba
...@@ -1246,8 +1246,7 @@ static int ethoc_probe(struct platform_device *pdev) ...@@ -1246,8 +1246,7 @@ 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);
out: out:
...@@ -1271,8 +1270,7 @@ static int ethoc_remove(struct platform_device *pdev) ...@@ -1271,8 +1270,7 @@ 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment