phylib: fix PAL state machine restart on resume
authorSimon Guinot <sguinot@lacie.com>
Mon, 13 Sep 2010 22:12:01 +0000 (22:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Sep 2010 21:31:03 +0000 (14:31 -0700)
On resume, before starting the PAL state machine, check if the
adjust_link() method is well supplied. If not, this would lead to a
NULL pointer dereference in the phy_state_machine() function.

This scenario can happen if the Ethernet driver call manually the PHY
functions instead of using the PAL state machine. The mv643xx_eth driver
is a such example.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found