Skip to contentSkip to conversation

Bonding Remove debug_fs files when module init fails

PATCH Applied Thomas Richter 3 participants 3 messages Apr 9, 2014 – Apr 11, 2014

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

PATCH 1/1 Bonding Remove debug_fs files when module init fails

Remove the bonding debug_fs entries when the
module initialization fails. The debug_fs
entries should be removed together with all other
already allocated resources.

---
 drivers/net/bonding/bond_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/bonding/bond_main.c +1 -0
index 95a6ca7..c11e7b7 100644
@@ -4492,6 +4492,7 @@ static int __init bonding_init(void)
 out:
 	return res;
 err:
+	bond_destroy_debugfs();
 	bond_netlink_fini();
 err_link:
 	unregister_pernet_subsys(&bond_net_ops);
Signature · 1 line
1.9.0
#1 lore raw
Quoted 6 lines · Thomas Richter

Remove the bonding debug_fs entries when the module initialization fails. The debug_fs entries should be removed together with all other already allocated resources.

Quoted 17 lines

---
drivers/net/bonding/bond_main.c | 1 +

1 file changed, 1 insertion(+)
drivers/net/bonding/bond_main.c +0 -0
index 95a6ca7..c11e7b7 100644
@@ -4492,6 +4492,7 @@ static int __init bonding_init(void)

out:

	return res;

err:

drivers/net/bonding/bond_main.c +1 -0
+	bond_destroy_debugfs();
	bond_netlink_fini();
err_link:
	unregister_pernet_subsys(&bond_net_ops);