netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: fix double-initialization of phy_iface
@ 2015-11-05  9:26 LABBE Corentin
  2015-11-05 19:09 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: LABBE Corentin @ 2015-11-05  9:26 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, linux-kernel, LABBE Corentin

The variable phy_iface is double-initialized to itself.
This patch remove that.

Reported-by: coverity (CID 1271141)
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 11baa4b..0cd3ecf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -354,7 +354,7 @@ static int gmac_clk_init(struct rk_priv_data *bsp_priv)
 
 static int gmac_clk_enable(struct rk_priv_data *bsp_priv, bool enable)
 {
-	int phy_iface = phy_iface = bsp_priv->phy_iface;
+	int phy_iface = bsp_priv->phy_iface;
 
 	if (enable) {
 		if (!bsp_priv->clk_enabled) {
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: stmmac: fix double-initialization of phy_iface
  2015-11-05  9:26 [PATCH] net: stmmac: fix double-initialization of phy_iface LABBE Corentin
@ 2015-11-05 19:09 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-11-05 19:09 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: peppe.cavallaro, netdev, linux-kernel

From: LABBE Corentin <clabbe.montjoie@gmail.com>
Date: Thu,  5 Nov 2015 10:26:46 +0100

> The variable phy_iface is double-initialized to itself.
> This patch remove that.
> 
> Reported-by: coverity (CID 1271141)
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-05 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05  9:26 [PATCH] net: stmmac: fix double-initialization of phy_iface LABBE Corentin
2015-11-05 19:09 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).