Linux bluetooth development
 help / color / mirror / Atom feed
* [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072
@ 2026-09-17 19:15 Dan Carpenter
  2026-09-17 19:17 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2026-09-17 19:15 UTC (permalink / raw)
  To: Zijun Hu; +Cc: linux-bluetooth

Hello Zijun Hu,

Commit 2e63b55654e0 ("Bluetooth: btusb: Add support for Qualcomm
multi-subsystem QCC2072") from Sep 13, 2026 (linux-next), leads to
the following Smatch static checker warning:

	drivers/bluetooth/btusb_qcom.c:2516 btqcom_set_bdaddr()
	warn: passing positive error code '(-4095)-(-62),(-60)-(-1),1-255' to 'ERR_PTR'

drivers/bluetooth/btusb_qcom.c
    2507   *
    2508   * Return: 0 on success, or a negative errno on failure.
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    2509   */
    2510 static int btqcom_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
    2511 {
    2512         int ret;
    2513 
    2514         ret = __hci_reset_sync(hdev);
    2515         if (ret) {
--> 2516                 bt_dev_err(hdev, "HCI reset before setting BD_ADDR failed: %pe",
    2517                            ERR_PTR(ret));
    2518                 return ret;

ret comes from skb->data in __hci_cmd_sync_status_sk() so it's a u8 and
not necessarily a negative error code.

    2519         }
    2520 
    2521         ret = qbt_write_bda(hdev, bdaddr);
    2522 
    2523         return ret;
    2524 }

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

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

end of thread, other threads:[~2026-09-19 10:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 19:15 [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072 Dan Carpenter
2026-09-17 19:17 ` Dan Carpenter
2026-09-19  2:36   ` Zijun Hu
2026-09-19  5:07     ` Dan Carpenter
2026-09-19  7:04       ` Zijun Hu
2026-09-19 10:43         ` Dan Carpenter

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