[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1567566558-7764-1-git-send-email-zhongjiang@huawei.com>
Date: Wed, 4 Sep 2019 11:09:18 +0800
From: zhong jiang <zhongjiang@...wei.com>
To: <davem@...emloft.net>, <arvid.brodin@...en.se>
CC: <zhongjiang@...wei.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] net: hsr: remove an redundant null check before kfree_skb
kfree_skb has taken the null pointer into account. Hence just remove
the null check before kfree_skb.
Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
net/hsr/hsr_forward.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index ddd9605..0c9e5b0 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:
--
1.7.12.4
Powered by blists - more mailing lists