diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-02-05 06:09:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-05 06:09:17 -0500 |
commit | 2fa993423a345fd484f7295797ddb59b7738ad38 (patch) | |
tree | 309db06f9709919a78e55683a3bf22dca944fe56 | |
parent | cb7cd42930d4421780e78323f62243350ea14789 (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>
-rw-r--r-- | drivers/bluetooth/btsdio.c | 4 |
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) | |||
162 | bt_cb(skb)->pkt_type = hdr[3]; | 162 | bt_cb(skb)->pkt_type = hdr[3]; |
163 | 163 | ||
164 | err = hci_recv_frame(skb); | 164 | err = hci_recv_frame(skb); |
165 | if (err < 0) { | 165 | if (err < 0) |
166 | kfree(skb); | ||
167 | return err; | 166 | return err; |
168 | } | ||
169 | 167 | ||
170 | sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); | 168 | sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); |
171 | 169 | ||