Skip to content

Commit

Permalink
drivers/bluetooth/btsdio.c: fix double-free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Feb 5, 2008
1 parent cb7cd42 commit 2fa9934
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2fa9934

Please sign in to comment.