stmmac: fix NULL pointer dereference in capabilities fixup (v2)
authorAngus Clark <angus.clark@st.com>
Wed, 26 Oct 2011 19:43:08 +0000 (19:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Oct 2011 03:17:11 +0000 (23:17 -0400)
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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index fcdd5a2cbb5519a535c1b8b2d141efcf72ef3412..003ab56f49b6accac21e268cb6789c879af2f6fb 100644 (file)
@@ -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;
        }
 
        /*