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
|
@ -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 New Issue