Skip to content

Commit

Permalink
xfrm: remove unnecessary check in xfrmi_get_stats64
Browse files Browse the repository at this point in the history
if tstats of a device is not allocated, this device is not
registered correctly and can not be used.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
lrq-max authored and klassert committed Oct 8, 2018
1 parent abf1a08 commit b7138fd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/xfrm/xfrm_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,6 @@ static void xfrmi_get_stats64(struct net_device *dev,
{
int cpu;

if (!dev->tstats)
return;

for_each_possible_cpu(cpu) {
struct pcpu_sw_netstats *stats;
struct pcpu_sw_netstats tmp;
Expand Down

0 comments on commit b7138fd

Please sign in to comment.