Linux bluetooth development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Zijun Hu <zijun.hu@oss.qualcomm.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072
Date: Thu, 17 Sep 2026 22:15:22 +0300	[thread overview]
Message-ID: <aqw8ShHyjdZhPc4U@stanley.mountain> (raw)

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

             reply	other threads:[~2026-09-17 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 19:15 Dan Carpenter [this message]
2026-09-17 19:17 ` [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqw8ShHyjdZhPc4U@stanley.mountain \
    --to=error27@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=zijun.hu@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox