]> git.baikalelectronics.ru Git - kernel.git/commit
net/fec: fix the .remove code
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 7 Dec 2011 21:59:31 +0000 (21:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Dec 2011 00:51:20 +0000 (19:51 -0500)
commitfd490208851af39ee47f7001b2270522fd6b923f
tree9c0071c6fc4e8add7055829fe7c9e1519deb40f7
parenta5bc2a465e9952d236727bf7cfbaf574a7372e55
net/fec: fix the .remove code

The .remove code is broken in several ways.
 - mdiobus_unregister() is called twice for the same object in case of dual FEC
 - phy_disconnect() is being called when the PHY is already disconnected
 - the requested IRQ(s) are not freed
 - fec_stop() is being called with the inteface already stopped

 All of those lead to kernel crashes if the remove function is actually used.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c