Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btintel: Drop dead !skb check in btintel_read_version()
@ 2026-07-10 20:30 Jang Ingyu
  2026-07-10 21:47 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jang Ingyu @ 2026-07-10 20:30 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz; +Cc: linux-bluetooth, linux-kernel

From: Ingyu Jang <ingyujang25@korea.ac.kr>

__hci_cmd_sync() returns either an ERR_PTR or a valid non-NULL skb;
its internal NULL cases are converted to ERR_PTR(-ENODATA) before
return (net/bluetooth/hci_sync.c). After the preceding IS_ERR(skb)
filter, skb is guaranteed to be a valid non-NULL pointer, so the
!skb disjunct in the subsequent length check never triggers.

Drop the dead !skb subexpression; the skb->len size mismatch check
remains the real guard.

Signed-off-by: Ingyu Jang <ingyujang25@korea.ac.kr>
---
 drivers/bluetooth/btintel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 5e9cac090bd8f..5361c1a8c8452 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -460,7 +460,7 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
 		return PTR_ERR(skb);
 	}
 
-	if (!skb || skb->len != sizeof(*ver)) {
+	if (skb->len != sizeof(*ver)) {
 		bt_dev_err(hdev, "Intel version event size mismatch");
 		kfree_skb(skb);
 		return -EILSEQ;
-- 
2.34.1


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

* RE: Bluetooth: btintel: Drop dead !skb check in btintel_read_version()
  2026-07-10 20:30 [PATCH] Bluetooth: btintel: Drop dead !skb check in btintel_read_version() Jang Ingyu
@ 2026-07-10 21:47 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-07-10 21:47 UTC (permalink / raw)
  To: linux-bluetooth, ingyujang25

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.60 seconds
VerifyFixes                   PASS      0.10 seconds
VerifySignedoff               PASS      0.09 seconds
GitLint                       PASS      0.25 seconds
SubjectPrefix                 PASS      4.42 seconds
BuildKernel                   PASS      27.18 seconds
CheckAllWarning               PASS      29.72 seconds
CheckSparse                   PASS      27.70 seconds
BuildKernel32                 PASS      25.90 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      497.62 seconds
IncrementalBuild              PASS      33.22 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found


https://github.com/bluez/bluetooth-next/pull/424

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-07-10 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 20:30 [PATCH] Bluetooth: btintel: Drop dead !skb check in btintel_read_version() Jang Ingyu
2026-07-10 21:47 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox