]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver
authorGrant Likely <grant.likely@secretlab.ca>
Sat, 22 Mar 2008 03:20:29 +0000 (14:20 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 24 Mar 2008 06:55:48 +0000 (17:55 +1100)
commit163d0c073ef11589fc631e24aa47610938b2856a
tree5a8fd8fef3283cafbbe1419ca296eaa293d07afa
parent74976ba39efd2f856063585d8f9664ad4140e582
[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driver

If the reg property is missing from the phy node (unlikely, but possible),
then the kernel will oops with a NULL pointer dereference.  This fixes
it by checking the pointer first.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/net/fec_mpc52xx_phy.c