Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data)
	bt_cb(skb)->pkt_type = hdr[3];
	bt_cb(skb)->pkt_type = hdr[3];


	err = hci_recv_frame(skb);
	err = hci_recv_frame(skb);
	if (err < 0) {
	if (err < 0)
		kfree(skb);
		return err;
		return err;
	}


	sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);
	sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);