]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
xfrm: remove unnecessary check in xfrmi_get_stats64
authorLi RongQing <lirongqing@baidu.com>
Sun, 7 Oct 2018 01:56:15 +0000 (09:56 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 8 Oct 2018 06:15:55 +0000 (08:15 +0200)
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>
net/xfrm/xfrm_interface.c

index dc5b20bf29cf4ecda5d161327fb6b34faf1cfbaa..abafd49cc65da84ae20c5fe91791e211eeea59d2 100644 (file)
@@ -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;