Skip to contentSkip to conversation

Bluetooth: btusb: Set error code in btusb_mtk_hci_wmt_sync()

PATCH [email protected] 1 participant 1 message Mar 13, 2024 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Okay, thank you. The new patch has been sent

email:[email protected]


From: Youwan Wang

Date: 2024-03-13 15:43

To: marcel

CC johan.hedberg; luiz.dentz; linux-bluetooth; Youwan Wang

Subject: [v3] Bluetooth: btusb: Set error code in btusb_mtk_hci_wmt_sync()

Convenient to check if the function was executed successfully

and know the specific error location in the code.

---

drivers/bluetooth/btusb.c | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)

drivers/bluetooth/btusb.c +0 -0

index d793dcd06687..a7244a8a5b7c 100644

--- a/drivers/bluetooth/btusb.c

+++ b/drivers/bluetooth/btusb.c

@@ -2824,8 +2824,10 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev,

goto err_free_wc;

}

- if (data->evt_skb == NULL)

+ if (data->evt_skb == NULL) {

+ err = -ENOBUFS;

goto err_free_wc;

+ }

/* Parse and handle the return WMT event */

wmt_evt = (struct btmtk_hci_wmt_evt *)data->evt_skb->data;

--

2.25.1