浏览代码

net: vlan: remove reduntant check in ndo_fix_features callback

Use the fact that ORing with zero is a no-op.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michał Mirosław 14 年之前
父节点
当前提交
6c9c1b5456
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      net/8021q/vlan_dev.c

+ 1 - 2
net/8021q/vlan_dev.c

@@ -593,8 +593,7 @@ static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
 	features &= real_dev->features;
 	features &= real_dev->vlan_features;
 
-	if (old_features & NETIF_F_SOFT_FEATURES)
-		features |= old_features & NETIF_F_SOFT_FEATURES;
+	features |= old_features & NETIF_F_SOFT_FEATURES;
 
 	if (dev_ethtool_get_rx_csum(real_dev))
 		features |= NETIF_F_RXCSUM;