From a4630dfe8c1c8da8484c98a64b1a4d4ac65ccf11 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Fri, 23 Aug 2013 10:45:07 +0800 Subject: [PATCH] bonding: fix error return code in bond_enslave() Fix to return a negative error code in the add bond vlan ids error handling case instead of 0, as done elsewhere in this function. Introduced by commit ce601c52a7bb061a159d2a06ac519627d295e394. (bonding: change the bond's vlan syncing functions with the standard ones) Signed-off-by: Wei Yongjun Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller --- drivers/net/bonding/bond_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4264a7631cbab..7407e65f5d96c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1603,7 +1603,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) dev_mc_add(slave_dev, lacpdu_multicast); } - if (vlan_vids_add_by_dev(slave_dev, bond_dev)) { + res = vlan_vids_add_by_dev(slave_dev, bond_dev); + if (res) { pr_err("%s: Error: Couldn't add bond vlan ids to %s\n", bond_dev->name, slave_dev->name); goto err_close; -- 2.39.5