From e2c57f839c63f452b4704e048c8db9cf669ed410 Mon Sep 17 00:00:00 2001 From: Angus Clark Date: Wed, 26 Oct 2011 19:43:08 +0000 Subject: [PATCH] stmmac: fix NULL pointer dereference in capabilities fixup (v2) Signed-off-by: Angus Clark Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index fcdd5a2cbb55..003ab56f49b6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/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; } /* -- 2.30.2