2019-07-09 01:32:48

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] Bluetooth: hci_qca: Use kfree_skb() instead of kfree()

Use kfree_skb() instead of kfree() to free sk_buff.

Fixes: 2faa3f15fa2f ("Bluetooth: hci_qca: wcn3990: Drop baudrate change vendor event")
Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/bluetooth/hci_qca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 9a5c9c1f9484..cbae86e55aed 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -909,7 +909,7 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
if (hdr->evt == HCI_EV_VENDOR)
complete(&qca->drop_ev_comp);

- kfree(skb);
+ kfree_skb(skb);

return 0;
}




2019-07-09 14:53:18

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [PATCH -next] Bluetooth: hci_qca: Use kfree_skb() instead of kfree()

On Tue, Jul 09, 2019 at 01:35:30AM +0000, Wei Yongjun wrote:
> Use kfree_skb() instead of kfree() to free sk_buff.
>
> Fixes: 2faa3f15fa2f ("Bluetooth: hci_qca: wcn3990: Drop baudrate change vendor event")
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/bluetooth/hci_qca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 9a5c9c1f9484..cbae86e55aed 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -909,7 +909,7 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
> if (hdr->evt == HCI_EV_VENDOR)
> complete(&qca->drop_ev_comp);
>
> - kfree(skb);
> + kfree_skb(skb);
>
> return 0;
> }

Good catch, thanks!

Reviewed-by: Matthias Kaehlcke <[email protected]>

2019-07-11 07:10:54

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH -next] Bluetooth: hci_qca: Use kfree_skb() instead of kfree()

Hi Wei,

> Use kfree_skb() instead of kfree() to free sk_buff.
>
> Fixes: 2faa3f15fa2f ("Bluetooth: hci_qca: wcn3990: Drop baudrate change vendor event")
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/bluetooth/hci_qca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel