We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ccb016 commit cc2e90aCopy full SHA for cc2e90a
drivers/net/bonding/bond_main.c
@@ -5053,15 +5053,19 @@ int bond_create(struct net *net, const char *name)
5053
bond_dev->rtnl_link_ops = &bond_link_ops;
5054
5055
res = register_netdevice(bond_dev);
5056
+ if (res < 0) {
5057
+ free_netdev(bond_dev);
5058
+ rtnl_unlock();
5059
+
5060
+ return res;
5061
+ }
5062
5063
netif_carrier_off(bond_dev);
5064
5065
bond_work_init_all(bond);
5066
5067
rtnl_unlock();
- if (res < 0)
- free_netdev(bond_dev);
- return res;
5068
+ return 0;
5069
}
5070
5071
static int __net_init bond_net_init(struct net *net)
0 commit comments