Skip to content

Commit

Permalink
Bluetooth: Remove some pointless conditionals before kfree_skb()
Browse files Browse the repository at this point in the history
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
Wei Yongjun authored and holtmann committed Feb 27, 2009
1 parent 7585b97 commit b1fb068
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/bluetooth/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions drivers/bluetooth/hci_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b1fb068

Please sign in to comment.