aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 208d2c4ef068..ecea6c294132 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5056,6 +5056,7 @@ static int bond_validate(struct nlattr *tb[], struct nlattr *data[])
5056 5056
5057static struct rtnl_link_ops bond_link_ops __read_mostly = { 5057static struct rtnl_link_ops bond_link_ops __read_mostly = {
5058 .kind = "bond", 5058 .kind = "bond",
5059 .priv_size = sizeof(struct bonding),
5059 .setup = bond_setup, 5060 .setup = bond_setup,
5060 .validate = bond_validate, 5061 .validate = bond_validate,
5061}; 5062};
@@ -5157,7 +5158,7 @@ static int __init bonding_init(void)
5157 5158
5158 res = rtnl_link_register(&bond_link_ops); 5159 res = rtnl_link_register(&bond_link_ops);
5159 if (res) 5160 if (res)
5160 goto err; 5161 goto err_link;
5161 5162
5162 for (i = 0; i < max_bonds; i++) { 5163 for (i = 0; i < max_bonds; i++) {
5163 res = bond_create(&init_net, NULL); 5164 res = bond_create(&init_net, NULL);
@@ -5176,6 +5177,7 @@ out:
5176 return res; 5177 return res;
5177err: 5178err:
5178 rtnl_link_unregister(&bond_link_ops); 5179 rtnl_link_unregister(&bond_link_ops);
5180err_link:
5179 unregister_pernet_gen_subsys(bond_net_id, &bond_net_ops); 5181 unregister_pernet_gen_subsys(bond_net_id, &bond_net_ops);
5180 goto out; 5182 goto out;
5181 5183