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: zhong jiang <zhongjiang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
1d08962ff1
Коммит
e3c3215e41
|
@ -192,10 +192,8 @@ 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);
|
||||
kfree_skb(nu->tx_skb);
|
||||
kfree_skb(nu->rx_skb);
|
||||
|
||||
skb_queue_purge(&nu->tx_q);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче