From: Andre Eikmeyer <dev@deq.rocks>
To: sven@kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com
Cc: j@jannau.net, neal@gompa.dev, asahi@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Andre Eikmeyer <dev@deq.rocks>
Subject: [PATCH v2 1/3] Bluetooth: hci_bcm4377: treat only negative hci_register_dev() returns as errors
Date: Wed, 11 Nov 2026 13:02:46 +0100 [thread overview]
Message-ID: <20261111120248.21062-2-dev@deq.rocks> (raw)
In-Reply-To: <20261111120248.21062-1-dev@deq.rocks>
If another controller already holds hci0, a USB Bluetooth dongle for
example, the BCM4377 is registered as hci1 and probe returns 1. The PCI
core takes that as success, but the devm action that unregisters the
controller is never added, so it stays registered after unbind while
its driver data is freed.
hci_register_dev() returns the index of the new controller on success.
Check for a negative return, as the other drivers do.
Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
---
drivers/bluetooth/hci_bcm4377.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 66d49b47154..da0a48c2be3 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -2410,7 +2410,7 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return ret;
ret = hci_register_dev(hdev);
- if (ret)
+ if (ret < 0)
return ret;
return devm_add_action_or_reset(&pdev->dev, bcm4377_hci_unregister_dev,
hdev);
next prev parent reply other threads:[~2026-11-11 12:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:02 [PATCH v2 0/3] Bluetooth: hci_bcm4377: resume after ACPI S3 and ASPM Andre Eikmeyer
2026-11-11 12:02 ` Andre Eikmeyer [this message]
2026-11-11 12:02 ` [PATCH v2 2/3] Bluetooth: hci_bcm4377: probe again after a resume through firmware Andre Eikmeyer
2026-11-11 12:02 ` [PATCH v2 3/3] Bluetooth: hci_bcm4377: keep ASPM off only while the firmware boots Andre Eikmeyer
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=20261111120248.21062-2-dev@deq.rocks \
--to=dev@deq.rocks \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=neal@gompa.dev \
--cc=sven@kernel.org \
/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
all inboxes | Powered by JetHome®