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

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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -367,9 +367,7 @@ 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);
	return;