]> git.baikalelectronics.ru Git - kernel.git/commit
smsc9420: prevent BUG() if ethtool is called with interface down
authorSteve Glendinning <steve.glendinning@smsc.com>
Mon, 30 Nov 2009 07:14:45 +0000 (23:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2009 07:14:45 +0000 (23:14 -0800)
commit00a6c603e51f73546c0fff2d60abe1590570f153
tree365c523513c54ab2b4eed1ca710fa007b8f84cce
parentb8866a6def3e3617c72a31ee38f36fe521b28f6b
smsc9420: prevent BUG() if ethtool is called with interface down

This patch fixes a null pointer dereference BUG() if ethtool is used on
an smsc9420 interface while it is down, because the phy_dev is only
allocated while the interface is up.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/smsc9420.c