Subject: Re: [PATCH 2/3] stmmac: fix NULL pointer dereference in capabilities fixup

From: Ben Hutchings <[email-masked]>
Date: Thu, 27 Oct 2011 00:26:48 +0200

On Wed, 2011-10-26 at 15:55 +0200, Giuseppe CAVALLARO wrote:
> From: Angus Clark <[email-masked]>
> 
> Signed-off-by: Angus Clark <[email-masked]>
> Acked-by: Giuseppe Cavallaro <[email-masked]>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index fcdd5a2..f77eaa6 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;
> +		priv->phydev->advertising = phydev->supported;

How can this fix the bug?  You mean:

		phydev->advertising = phydev->supported;

Ben.

>  	}
>  	/*

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.