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

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
...@@ -192,10 +192,8 @@ static void nci_uart_tty_close(struct tty_struct *tty) ...@@ -192,10 +192,8 @@ static void nci_uart_tty_close(struct tty_struct *tty)
if (!nu) if (!nu)
return; return;
if (nu->tx_skb) kfree_skb(nu->tx_skb);
kfree_skb(nu->tx_skb); kfree_skb(nu->rx_skb);
if (nu->rx_skb)
kfree_skb(nu->rx_skb);
skb_queue_purge(&nu->tx_q); skb_queue_purge(&nu->tx_q);
......
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