summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btsdio.c
diff options
context:
space:
mode:
authorAdrian Bunk2008-02-05 12:09:17 +0100
committerDavid S. Miller2008-02-05 12:09:17 +0100
commit2fa993423a345fd484f7295797ddb59b7738ad38 (patch)
tree309db06f9709919a78e55683a3bf22dca944fe56 /drivers/bluetooth/btsdio.c
parentdrivers/bluetooth/bpa10x.c: fix memleak (diff)
downloadkernel-qcow2-linux-2fa993423a345fd484f7295797ddb59b7738ad38.tar.gz
kernel-qcow2-linux-2fa993423a345fd484f7295797ddb59b7738ad38.tar.xz
kernel-qcow2-linux-2fa993423a345fd484f7295797ddb59b7738ad38.zip
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);