Commit 2fa99342 authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller

drivers/bluetooth/btsdio.c: fix double-free

This patch fixes a double-free spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb7cd429
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment