2023-10-19 02:41:03

by Youwan Wang

[permalink] [raw]
Subject: [PATCH] Bluetooth: btusb: Add return error code

From: youwan Wang <[email protected]>

Signed-off-by: youwan Wang <[email protected]>
---
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;
--
2.25.1


2023-10-19 03:38:42

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: btusb: Add return error code

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=794552

---Test result---

Test Summary:
CheckPatch PASS 0.60 seconds
GitLint PASS 0.27 seconds
SubjectPrefix PASS 0.09 seconds
BuildKernel PASS 35.14 seconds
CheckAllWarning PASS 38.06 seconds
CheckSparse PASS 47.25 seconds
CheckSmatch PASS 118.38 seconds
BuildKernel32 PASS 33.80 seconds
TestRunnerSetup PASS 527.27 seconds
TestRunner_l2cap-tester PASS 31.32 seconds
TestRunner_iso-tester PASS 57.57 seconds
TestRunner_bnep-tester PASS 10.54 seconds
TestRunner_mgmt-tester PASS 224.89 seconds
TestRunner_rfcomm-tester PASS 16.28 seconds
TestRunner_sco-tester PASS 19.56 seconds
TestRunner_ioctl-tester PASS 18.25 seconds
TestRunner_mesh-tester PASS 15.22 seconds
TestRunner_smp-tester PASS 14.49 seconds
TestRunner_userchan-tester PASS 11.17 seconds
IncrementalBuild PASS 32.42 seconds



---
Regards,
Linux Bluetooth

2023-10-19 10:31:27

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: btusb: Add return error code

Dear Youwan,


Thank you for your patch.

It’d be great, if you versioned your patches. For example:

git format-patch -v3 …

Am 19.10.23 um 04:39 schrieb king:
> From: youwan Wang <[email protected]>
>
> Signed-off-by: youwan Wang <[email protected]>

It’d be great if you started the first name with an uppercase letter too.

Despite patch diff stats being small and the patch probably trivial,
it’s common practice to state the motivation for the change nevertheless
in the commit message body.

> ---
> 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