net: bridge: Fix missing return assignment from br_vlan_replay_one call

The call to br_vlan_replay_one is returning an error return value but
this is not being assigned to err and the following check on err is
currently always false because err was initialized to zero. Fix this
by assigning err.

Addresses-Coverity: ("'Constant' variable guards dead code")
Fixes: 22f67cdfae ("net: bridge: add helper to replay VLANs installed on port")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Colin Ian King 2021-03-24 15:09:50 +00:00 committed by David S. Miller
parent bb11d9ac9d
commit ad248f7761

View File

@ -1815,7 +1815,7 @@ int br_vlan_replay(struct net_device *br_dev, struct net_device *dev,
if (!br_vlan_should_use(v))
continue;
br_vlan_replay_one(nb, dev, &vlan, extack);
err = br_vlan_replay_one(nb, dev, &vlan, extack);
if (err)
return err;
}