From 2b96692bcfcd2be7c9aa55dc13440213cd54c654 Mon Sep 17 00:00:00 2001 From: Wang Hai Date: Sat, 18 Jul 2020 20:53:38 +0800 Subject: net: hsr: remove redundant null check Because kfree_skb already checked NULL skb parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller --- net/hsr/hsr_forward.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/hsr') diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index ed13760463de..92c8ad75200b 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -367,10 +367,8 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port) port->dev->stats.tx_bytes += skb->len; } - if (frame.skb_hsr) - kfree_skb(frame.skb_hsr); - if (frame.skb_std) - kfree_skb(frame.skb_std); + kfree_skb(frame.skb_hsr); + kfree_skb(frame.skb_std); return; out_drop: -- cgit v1.2.3