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: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YueHaibing 2018-05-16 19:18:22 +08:00 committed by David S. Miller
parent 93120eba48
commit 76e597eb15
1 changed files with 2 additions and 4 deletions

View File

@ -1246,8 +1246,7 @@ error:
mdiobus_unregister(priv->mdio);
mdiobus_free(priv->mdio);
free2:
if (priv->clk)
clk_disable_unprepare(priv->clk);
clk_disable_unprepare(priv->clk);
free:
free_netdev(netdev);
out:
@ -1271,8 +1270,7 @@ static int ethoc_remove(struct platform_device *pdev)
mdiobus_unregister(priv->mdio);
mdiobus_free(priv->mdio);
}
if (priv->clk)
clk_disable_unprepare(priv->clk);
clk_disable_unprepare(priv->clk);
unregister_netdev(netdev);
free_netdev(netdev);
}