mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +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…
Add table
Add a link
Reference in a new issue