net: mv643xx_eth: potential NULL dereference in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Nov 2013 07:52:47 +0000 (10:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Dec 2013 15:29:11 +0000 (07:29 -0800)
commit4b2867325d676b875154dbe0da8f3c4954dcaacc
tree0254b775871ebfed5d2b6a1e12d903bdeb2fdd56
parentdb4968268ffaf57aa36950073b8f24ccb9e186df
net: mv643xx_eth: potential NULL dereference in probe()

upstream commit 6115c11fe1a5a636ac99fc823b00df4ff3c0674e

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@oracle.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mv643xx_eth.c