Bluetooth: Remove some pointless conditionals before kfree_skb()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 25 Feb 2009 10:09:33 +0000 (18:09 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 27 Feb 2009 05:14:50 +0000 (06:14 +0100)
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/bfusb.c
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_ll.c

index d3f14bee0f1939fcb1ff0261e6018b0f99e1689e..2a00707aba3bb697493f7fabaeba939a388d092e 100644 (file)
@@ -257,8 +257,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
 
        if (hdr & 0x10) {
                BT_ERR("%s error in block", data->hdev->name);
-               if (data->reassembly)
-                       kfree_skb(data->reassembly);
+               kfree_skb(data->reassembly);
                data->reassembly = NULL;
                return -EIO;
        }
index b0fafb0559964762ee7db79a32dd336d34e2017b..c0ce8134814e161e5da0b9f59635b9ce26e21983 100644 (file)
@@ -102,8 +102,7 @@ static int h4_close(struct hci_uart *hu)
 
        skb_queue_purge(&h4->txq);
 
-       if (h4->rx_skb)
-               kfree_skb(h4->rx_skb);
+       kfree_skb(h4->rx_skb);
 
        hu->priv = NULL;
        kfree(h4);
index b91d45a41b2f6b7e88716626b392a33124b789d8..5c65014635bee18b493870f3a70b94b03b652df2 100644 (file)
@@ -163,8 +163,7 @@ static int ll_close(struct hci_uart *hu)
        skb_queue_purge(&ll->tx_wait_q);
        skb_queue_purge(&ll->txq);
 
-       if (ll->rx_skb)
-               kfree_skb(ll->rx_skb);
+       kfree_skb(ll->rx_skb);
 
        hu->priv = NULL;