Skip to contentSkip to conversation

net: bluetooth: assign len after null check

PATCH In review Qing Wang 3 participants 3 messages Feb 15, 2022 – Feb 16, 2022

Subsystems (4)
lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 net: bluetooth: assign len after null check

From: Wang Qing <[email protected]>

len should be assigned after a null check

---
 net/bluetooth/mgmt_util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/mgmt_util.c +2 -1
index edee60b..37eef2c
@@ -77,11 +77,12 @@ int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag,
 {
 	struct hci_dev *hdev;
 	struct mgmt_hdr *hdr;
-	int len = skb->len;
+	int len;
 
 	if (!skb)
 		return -EINVAL;
 
+	len = skb->len;
 	hdev = bt_cb(skb)->mgmt.hdev;
 
 	/* Time stamp */
Signature · 1 line
2.7.4
#1 lore raw

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

---Test result---

Test Summary:

CheckPatch                    PASS      1.62 seconds
GitLint                       PASS      0.94 seconds
SubjectPrefix                 FAIL      0.93 seconds
BuildKernel                   PASS      29.24 seconds
BuildKernel32                 PASS      25.80 seconds
Incremental Build with patchesPASS      36.01 seconds
TestRunner: Setup             PASS      460.64 seconds
TestRunner: l2cap-tester      PASS      13.05 seconds
TestRunner: bnep-tester       PASS      5.87 seconds
TestRunner: mgmt-tester       PASS      100.79 seconds
TestRunner: rfcomm-tester     PASS      7.37 seconds
TestRunner: sco-tester        PASS      7.28 seconds
TestRunner: smp-tester        PASS      7.21 seconds
TestRunner: userchan-tester   PASS      6.09 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.93 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject

---
Regards,
Linux Bluetooth