]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: fec: remove checking for NULL phy_dev in fec_enet_close()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 7 Jul 2014 23:22:54 +0000 (00:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 04:21:22 +0000 (21:21 -0700)
commit635cf17ce220aa4fef93528775646e0a181b2dc2
tree3e82994661c96265667164639c1f1bb9d3df3982
parentb49cd504c46dd729011049c91cf11ea72df01aef
net: fec: remove checking for NULL phy_dev in fec_enet_close()

fep->phy_dev can not be NULL here for two reasons:
- fec_enet_open() will have successfully connected the phy, or will have
  failed.
- fec_enet_open() will have called phy_start(fep->phy_dev), which
  unconditionally dereferences this pointer.

If it were to be NULL here, then fec_enet_open() will have already
oopsed.

Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c