* [PATCH] drivers: net: phy: xgene: Fix 'remove' function
@ 2016-09-11 19:43 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2016-09-11 19:43 UTC (permalink / raw)
To: isubramanian, kchudgar, f.fainelli
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/net/phy/mdio-xgene.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/mdio-xgene.c b/drivers/net/phy/mdio-xgene.c
index 775674808249..92af182951be 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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drivers: net: phy: xgene: Fix 'remove' function
@ 2016-09-11 19:43 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2016-09-11 19:43 UTC (permalink / raw)
To: isubramanian, kchudgar, f.fainelli
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/net/phy/mdio-xgene.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/mdio-xgene.c b/drivers/net/phy/mdio-xgene.c
index 775674808249..92af182951be 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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: net: phy: xgene: Fix 'remove' function
2016-09-11 19:43 ` Christophe JAILLET
@ 2016-09-13 16:06 ` David Miller
-1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-09-13 16:06 UTC (permalink / raw)
To: christophe.jaillet
Cc: isubramanian, kchudgar, f.fainelli, netdev, linux-kernel,
kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun, 11 Sep 2016 21:43:34 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: net: phy: xgene: Fix 'remove' function
@ 2016-09-13 16:06 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-09-13 16:06 UTC (permalink / raw)
To: christophe.jaillet
Cc: isubramanian, kchudgar, f.fainelli, netdev, linux-kernel,
kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun, 11 Sep 2016 21:43:34 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-13 16:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-11 19:43 [PATCH] drivers: net: phy: xgene: Fix 'remove' function Christophe JAILLET
2016-09-11 19:43 ` Christophe JAILLET
2016-09-13 16:06 ` David Miller
2016-09-13 16:06 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.