net: bridge: remove redundant continue statement
authorColin Ian King <colin.king@canonical.com>
Fri, 18 Jun 2021 10:01:55 +0000 (11:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 19:08:40 +0000 (12:08 -0700)
The continue statement at the end of a for-loop has no effect,
invert the if expression and remove the continue.

Addresses-Coverity: ("Continue has no effect")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_vlan.c

index da3256a..8789a57 100644 (file)
@@ -113,9 +113,7 @@ static void __vlan_add_list(struct net_bridge_vlan *v)
        headp = &vg->vlan_list;
        list_for_each_prev(hpos, headp) {
                vent = list_entry(hpos, struct net_bridge_vlan, vlist);
-               if (v->vid < vent->vid)
-                       continue;
-               else
+               if (v->vid >= vent->vid)
                        break;
        }
        list_add_rcu(&v->vlist, hpos);