Altera TSE: Fix Panic in probe routine when phy probe fails
authorVince Bridgers <vbridger@altera.com>
Thu, 24 Apr 2014 21:58:10 +0000 (16:58 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Apr 2014 16:26:26 +0000 (12:26 -0400)
commita76420092d3d9f2e52ad7469c210c0e2fa962fe4
tree65c8efdbdc2618ae5f892ca99d5daaa7141a224f
parent5aec4ee3724ad93ee63cafc6f6b5f9cd40adda52
Altera TSE: Fix Panic in probe routine when phy probe fails

This patch addresses a fault in the error recovery path of the probe
routine where the netdev structure was not being unregistered properly
leading to a panic only when the phy probe failed.

Abbreviated panic stack seen is as follows:

(free_netdev+0xXX) from (altera_tse_probe+0xXX)
(altera_tse_probe+0xXX) from (platform_drv_probe+0xXX)
(platform_drv_probe+0xXX) from (driver_probe_device+0xXX)
(driver_probe_device+0xXX) from (__driver_attach+0xXX)
(__driver_attach+0xXX) from (bus_for_each_dev+0xXX)
(bus_for_each_dev+0xXX) from (driver_attach+0xXX)
(driver_attach+0xXX) from (bus_add_driver+0xXX)
(bus_add_driver+0xXX) from (driver_register+0xXX)
(driver_register+0xXX) from (__platform_driver_register+0xXX)
(__platform_driver_register+0xXX) from (altera_tse_driver_init+0xXX)
(altera_tse_driver_init+0xXX) from (do_one_initcall+0xXX)
(do_one_initcall+0xXX) from (kernel_init_freeable+0xXX)
(kernel_init_freeable+0xXX) from (kernel_init+0xXX)
(kernel_init+0xXX) from (ret_from_fork+0xXX)

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/altera/altera_tse_main.c