Explorar o código

stmmac: fix NULL pointer dereference in capabilities fixup (v2)

Signed-off-by: Angus Clark <angus.clark@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Angus Clark %!s(int64=14) %!d(string=hai) anos
pai
achega
e2c57f839c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

+ 1 - 1
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

@@ -325,7 +325,7 @@ static int stmmac_init_phy(struct net_device *dev)
 	    (interface == PHY_INTERFACE_MODE_RMII))) {
 		phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
 				      SUPPORTED_Asym_Pause);
-		priv->phydev->advertising = priv->phydev->supported;
+		phydev->advertising = phydev->supported;
 	}
 
 	/*