diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2016-09-11 21:43:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-13 12:04:11 -0400 |
commit | 440f895aa97f81a2bdc02993da5360a1f6da2fb5 (patch) | |
tree | 2d49e4b29f9deb2f03e6ed0d9de9244a915f2d05 | |
parent | 715f5552b1e90ba3eecf6d1a6d044d0d5226663f (diff) | |
download | op-kernel-dev-440f895aa97f81a2bdc02993da5360a1f6da2fb5.zip op-kernel-dev-440f895aa97f81a2bdc02993da5360a1f6da2fb5.tar.gz |
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mdio-xgene.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/phy/mdio-xgene.c b/drivers/net/phy/mdio-xgene.c index 7756748..92af182 100644 --- a/drivers/net/phy/mdio-xgene.c +++ b/drivers/net/phy/mdio-xgene.c @@ -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; } |