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 ac26692 commit b54cf87Copy full SHA for b54cf87
drivers/net/bonding/bond_main.c
@@ -4817,15 +4817,19 @@ int bond_create(struct net *net, const char *name)
4817
bond_dev->rtnl_link_ops = &bond_link_ops;
4818
4819
res = register_netdevice(bond_dev);
4820
+ if (res < 0) {
4821
+ free_netdev(bond_dev);
4822
+ rtnl_unlock();
4823
+
4824
+ return res;
4825
+ }
4826
4827
netif_carrier_off(bond_dev);
4828
4829
bond_work_init_all(bond);
4830
4831
rtnl_unlock();
- if (res < 0)
- free_netdev(bond_dev);
- return res;
4832
+ return 0;
4833
}
4834
4835
static int __net_init bond_net_init(struct net *net)
0 commit comments