Commit 2b96692b authored by Wang Hai's avatar Wang Hai Committed by David S. Miller

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 405e30e2
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment