Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Wei Yongjun and committed by
Marcel Holtmann
b1fb0683 7585b97a

+3 -6
+1 -2
drivers/bluetooth/bfusb.c
··· 257 257 258 258 if (hdr & 0x10) { 259 259 BT_ERR("%s error in block", data->hdev->name); 260 - if (data->reassembly) 261 - kfree_skb(data->reassembly); 260 + kfree_skb(data->reassembly); 262 261 data->reassembly = NULL; 263 262 return -EIO; 264 263 }
+1 -2
drivers/bluetooth/hci_h4.c
··· 102 102 103 103 skb_queue_purge(&h4->txq); 104 104 105 - if (h4->rx_skb) 106 - kfree_skb(h4->rx_skb); 105 + kfree_skb(h4->rx_skb); 107 106 108 107 hu->priv = NULL; 109 108 kfree(h4);
+1 -2
drivers/bluetooth/hci_ll.c
··· 163 163 skb_queue_purge(&ll->tx_wait_q); 164 164 skb_queue_purge(&ll->txq); 165 165 166 - if (ll->rx_skb) 167 - kfree_skb(ll->rx_skb); 166 + kfree_skb(ll->rx_skb); 168 167 169 168 hu->priv = NULL; 170 169