Re: [PATCH 1/2] Bluetooth: hci_bcm4377: treat only negative hci_register_dev() returns as errors

From: Sven Peter

Date: Sun Nov 08 2026 - 08:15:22 EST




On 11/7/26 16:48, Andre Eikmeyer wrote:
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>
---

ouch.. good catch!

Reviewed-by: Sven Peter <sven@xxxxxxxxxx>


Thanks,

Sven