* [PATCH] bluetooth-drv: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:09 Wei Yongjun
2009-02-25 14:28 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2009-02-25 10:09 UTC (permalink / raw)
To: linux-bluetooth, Marcel Holtmann, Wei Yongjun
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
drivers/bluetooth/bfusb.c | 3 +--
drivers/bluetooth/hci_h4.c | 3 +--
drivers/bluetooth/hci_ll.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index d3f14be..2a00707 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -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;
}
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index b0fafb0..c0ce813 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -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);
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index b91d45a..5c65014 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -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;
--
1.5.3.8
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bluetooth-drv: remove some pointless conditionals before kfree_skb()
2009-02-25 10:09 [PATCH] bluetooth-drv: remove some pointless conditionals before kfree_skb() Wei Yongjun
@ 2009-02-25 14:28 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2009-02-25 14:28 UTC (permalink / raw)
To: Wei Yongjun; +Cc: linux-bluetooth
Hi Wei,
> Remove some pointless conditionals before kfree_skb().
patch has been added to my bluetooth-testing.git tree. Thanks.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-25 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 10:09 [PATCH] bluetooth-drv: remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-25 14:28 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox