Re: [V1] Bluetooth: btusb: Add return error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Youwan,


Thank you for your patch. In the commit message summary/title maybe be more specific:

Bluetooth: btusb: Set error code in btusb_mtk_hci_wmt_sync()

Am 13.03.24 um 06:11 schrieb Youwan Wang:
Add return error code

Could you please elaborate and describe the problem?

Signed-off-by: Youwan Wang <youwan@xxxxxxxxxxxx>
---
  drivers/bluetooth/btusb.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b8e9de887b5d..ec6bdc9687b1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2826,8 +2826,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;


Kind regards,

Paul




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux