Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a4ae5f6 authored by Li RongQing's avatar Li RongQing Committed by David S. Miller
Browse files

vlan: unnecessary to check if vlan_pcpu_stats is NULL



if allocating memory for vlan_pcpu_stats failed, the device can not be operated

Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2557877
Loading
Loading
Loading
Loading
+28 −30
Original line number Diff line number Diff line
@@ -706,8 +706,6 @@ static void vlan_ethtool_get_drvinfo(struct net_device *dev,

static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{

	if (vlan_dev_priv(dev)->vlan_pcpu_stats) {
	struct vlan_pcpu_stats *p;
	u32 rx_errors = 0, tx_dropped = 0;
	int i;
@@ -737,7 +735,7 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st
	}
	stats->rx_errors  = rx_errors;
	stats->tx_dropped = tx_dropped;
	}

	return stats;
}