summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btsdio.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-02-05 03:09:17 -0800
committerDavid S. Miller <davem@davemloft.net>2008-02-05 03:09:17 -0800
commit2fa993423a345fd484f7295797ddb59b7738ad38 (patch)
tree309db06f9709919a78e55683a3bf22dca944fe56 /drivers/bluetooth/btsdio.c
parentcb7cd42930d4421780e78323f62243350ea14789 (diff)
drivers/bluetooth/btsdio.c: fix double-free
This patch fixes a double-free spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/btsdio.c')
-rw-r--r--drivers/bluetooth/btsdio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
index b786f6187902..58630cc1eff2 100644
--- a/drivers/bluetooth/btsdio.c
+++ b/drivers/bluetooth/btsdio.c
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data)
bt_cb(skb)->pkt_type = hdr[3];
err = hci_recv_frame(skb);
- if (err < 0) {
- kfree(skb);
+ if (err < 0)
return err;
- }
sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);