diff mbox series

[ipsec-next] xfrm: remove unnecessary check in xfrmi_get_stats64

Message ID 1538877375-17220-1-git-send-email-lirongqing@baidu.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series [ipsec-next] xfrm: remove unnecessary check in xfrmi_get_stats64 | expand

Commit Message

Li RongQing Oct. 7, 2018, 1:56 a.m. UTC
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>
---
 net/xfrm/xfrm_interface.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Steffen Klassert Oct. 9, 2018, 8:20 a.m. UTC | #1
On Sun, Oct 07, 2018 at 09:56:15AM +0800, Li RongQing wrote:
> 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>

Applied to ipsec-next, thanks!
diff mbox series

Patch

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,
 {
 	int cpu;
 
-	if (!dev->tstats)
-		return;
-
 	for_each_possible_cpu(cpu) {
 		struct pcpu_sw_netstats *stats;
 		struct pcpu_sw_netstats tmp;