Skip to contentSkip to conversation

ucc_geth_mii: fix __exit called from __init

PATCH New Domen Puncer 1 participant 1 message Jul 20, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ucc_geth_mii: fix __exit called from __init

void __exit uec_mdio_exit(void) is called from
- static int __init ucc_geth_init(void)
- static void __exit ucc_geth_exit(void)

First one would make error path more than just an error.

---
 drivers/net/ucc_geth_mii.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ucc_geth_mii.c +2 -1
Index: work-powerpc.git/drivers/net/ucc_geth_mii.c
===================================================================
@@ -272,7 +272,8 @@ int __init uec_mdio_init(void)
 	return of_register_platform_driver(&uec_mdio_driver);
 }
 
-void __exit uec_mdio_exit(void)
+/* called from __init ucc_geth_init, therefore can not be __exit */
+void uec_mdio_exit(void)
 {
 	of_unregister_platform_driver(&uec_mdio_driver);
 }