driver: macvlan: Remove duplicated IFF_UP condition check in macvlan_forward_source
authorGao Feng <gfree.wind@gmail.com>
Mon, 21 Nov 2016 00:26:38 +0000 (08:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Nov 2016 16:58:49 +0000 (11:58 -0500)
The function macvlan_forward_source_one has already checked the flag
IFF_UP, so needn't check it outside in macvlan_forward_source too.

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index 13b7e0b9bd9b23c99d4196ab6a772b645d8966dc..7ddfd2c917ea973fd503b0e6ea0d8ca099a05eed 100644 (file)
@@ -400,8 +400,7 @@ static void macvlan_forward_source(struct sk_buff *skb,
 
        hlist_for_each_entry_rcu(entry, h, hlist) {
                if (ether_addr_equal_64bits(entry->addr, addr))
-                       if (entry->vlan->dev->flags & IFF_UP)
-                               macvlan_forward_source_one(skb, entry->vlan);
+                       macvlan_forward_source_one(skb, entry->vlan);
        }
 }