diff options
author | Li RongQing <lirongqing@baidu.com> | 2018-10-06 21:56:15 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2018-10-08 02:15:55 -0400 |
commit | b7138fddd6893a455cc82249f3d12ae651023543 (patch) | |
tree | 3ef1ba16cd2e3acccf65c411b05a8b378d74cc5b /net/xfrm/xfrm_interface.c | |
parent | abf1a08ff3237a27188ff8cc2904f2cea893af55 (diff) |
xfrm: remove unnecessary check in xfrmi_get_stats64
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>
Diffstat (limited to 'net/xfrm/xfrm_interface.c')
-rw-r--r-- | net/xfrm/xfrm_interface.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index dc5b20bf29cf..abafd49cc65d 100644 --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c | |||
@@ -561,9 +561,6 @@ static void xfrmi_get_stats64(struct net_device *dev, | |||
561 | { | 561 | { |
562 | int cpu; | 562 | int cpu; |
563 | 563 | ||
564 | if (!dev->tstats) | ||
565 | return; | ||
566 | |||
567 | for_each_possible_cpu(cpu) { | 564 | for_each_possible_cpu(cpu) { |
568 | struct pcpu_sw_netstats *stats; | 565 | struct pcpu_sw_netstats *stats; |
569 | struct pcpu_sw_netstats tmp; | 566 | struct pcpu_sw_netstats tmp; |