All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2] Bluetooth: btusb: Add return ENOBUFS error code
@ 2024-03-13  7:36 Youwan Wang
  2024-03-13  8:34 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Youwan Wang @ 2024-03-13  7:36 UTC (permalink / raw)
  To: marcel; +Cc: johan.hedberg, luiz.dentz, linux-bluetooth, Youwan Wang

Convenient to check if the function was executed successfully
and know the specific error location in the code.

Signed-off-by: Youwan Wang <youwan@nfschina.com>
---
 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 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-13  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-13  7:36 [v2] Bluetooth: btusb: Add return ENOBUFS error code Youwan Wang
2024-03-13  8:34 ` bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.