diff options
author | David S. Miller <davem@davemloft.net> | 2021-03-12 21:15:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-12 21:15:03 +0100 |
commit | 080bfa1e6d928a5d1f185cc44e5f3c251df06df5 (patch) | |
tree | 14cb697be3c45fdbbeb27d8374b6d8bd9f3b0efa /drivers/net/bonding/bond_main.c | |
parent | Merge branch 'htb-fixes' (diff) | |
download | linux-080bfa1e6d928a5d1f185cc44e5f3c251df06df5.tar.xz linux-080bfa1e6d928a5d1f185cc44e5f3c251df06df5.zip |
Revert "net: bonding: fix error return code of bond_neigh_init()"
This reverts commit 2055a99da8a253a357bdfd359b3338ef3375a26c.
This change rejects legitimate configurations.
A slave doesn't need to exist nor implement ndo_slave_setup.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 456315bef3a8..74cbbb22470b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3978,15 +3978,11 @@ static int bond_neigh_init(struct neighbour *n) rcu_read_lock(); slave = bond_first_slave_rcu(bond); - if (!slave) { - ret = -EINVAL; + if (!slave) goto out; - } slave_ops = slave->dev->netdev_ops; - if (!slave_ops->ndo_neigh_setup) { - ret = -EINVAL; + if (!slave_ops->ndo_neigh_setup) goto out; - } /* TODO: find another way [1] to implement this. * Passing a zeroed structure is fragile, |