Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3c3215e authored by zhong jiang's avatar zhong jiang Committed by David S. Miller
Browse files

net: nci: remove redundant null pointer check before kfree_skb



kfree_skb has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree_skb.

Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d08962f
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -192,9 +192,7 @@ static void nci_uart_tty_close(struct tty_struct *tty)
	if (!nu)
		return;

	if (nu->tx_skb)
	kfree_skb(nu->tx_skb);
	if (nu->rx_skb)
	kfree_skb(nu->rx_skb);

	skb_queue_purge(&nu->tx_q);