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>
This commit is contained in:
Wang Hai 2020-07-18 20:53:38 +08:00 committed by David S. Miller
parent 405e30e23c
commit 2b96692bcf
1 changed files with 2 additions and 4 deletions

View File

@ -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: