On Thu, Dec 05, 2013 at 04:19:32PM -0800, gregkh@xxxxxxxxxxxxxxxxxxx wrote: > > This is a note to let you know that I've just added the patch titled > > net: mv643xx_eth: Add missing phy_addr_set in DT mode Thank you Greg, you may also wish to include the below from 3.13 which corrects a small mistake in the patch. AFICT The only way to hit the null dereference is with an invalid DT. commit 6115c11fe1a5a636ac99fc823b00df4ff3c0674e Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Wed Nov 13 10:52:47 2013 +0300 net: mv643xx_eth: potential NULL dereference in probe() We assume that "mp->phy" can be NULL a couple lines before the dereference. Fixes: 1cce16d37d0f ('net: mv643xx_eth: Add missing phy_addr_set in DT mode') Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx> Acked-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 00cd36e..61088a6 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -2890,7 +2890,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev) PHY_INTERFACE_MODE_GMII); if (!mp->phy) err = -ENODEV; - phy_addr_set(mp, mp->phy->addr); + else + phy_addr_set(mp, mp->phy->addr); } else if (pd->phy_addr != MV643XX_ETH_PHY_NONE) { mp->phy = phy_scan(mp, pd->phy_addr); -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html