net: stmmac: fix double-initialization of phy_iface
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Thu, 5 Nov 2015 09:26:46 +0000 (10:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 19:09:26 +0000 (14:09 -0500)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

index 11baa4b..0cd3ecf 100644 (file)
@@ -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) {