mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
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:
parent
405e30e23c
commit
2b96692bcf
1 changed files with 2 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue