diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-07-18 20:53:38 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-20 18:33:32 -0700 |
commit | 2b96692bcfcd2be7c9aa55dc13440213cd54c654 (patch) | |
tree | 2897555f2ba464f17b71173cb7eaca97ad1a91fe /net/hsr | |
parent | 405e30e23cb37c1a1cd521f41db89d2d93bd1e3b (diff) | |
download | linux-stable-2b96692bcfcd2be7c9aa55dc13440213cd54c654.tar.gz linux-stable-2b96692bcfcd2be7c9aa55dc13440213cd54c654.tar.bz2 linux-stable-2b96692bcfcd2be7c9aa55dc13440213cd54c654.zip |
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 <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr')
-rw-r--r-- | net/hsr/hsr_forward.c | 6 |
1 files changed, 2 insertions, 4 deletions
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: |