[PATCH 1/1] Bluetooth: hci_mrvl: Leave the serdev port lifetime to hci_serdev
From: Michael McAllister
Date: Sat Nov 14 2026 - 11:16:26 EST
hci_uart_register_device_priv() opens the port before calling mrvl_open(),
so Marvell opens it twice. Likewise, mrvl_close() closes it before the
transport closes it again during unregister or registration error cleanup.
Remove the extra calls and let hci_serdev own the port lifetime. This also
avoids failing probe when serdev rejects a second open with -EALREADY.
Fixes: be70e5e774a6 ("Bluetooth: hci_mrvl: Add serdev support")
Reported-by: Markus Probst <markus.probst@xxxxxxxxx>
Closes: https://lore.kernel.org/341e56b1ff7d8a5b109e26e30dfed61faa54d603.camel@xxxxxxxxx/
Assisted-by: LLM
Signed-off-by: Michael McAllister <me@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/bluetooth/hci_mrvl.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c
index 5798a8db0..def19907c 100644
--- a/drivers/bluetooth/hci_mrvl.c
+++ b/drivers/bluetooth/hci_mrvl.c
@@ -57,7 +57,6 @@ struct hci_mrvl_pkt {
static int mrvl_open(struct hci_uart *hu)
{
struct mrvl_data *mrvl;
- int ret;
BT_DBG("hu %p", hu);
@@ -75,17 +74,7 @@ static int mrvl_open(struct hci_uart *hu)
hu->priv = mrvl;
- if (hu->serdev) {
- ret = serdev_device_open(hu->serdev);
- if (ret)
- goto err;
- }
-
return 0;
-err:
- kfree(mrvl);
-
- return ret;
}
static int mrvl_close(struct hci_uart *hu)
@@ -94,9 +83,6 @@ static int mrvl_close(struct hci_uart *hu)
BT_DBG("hu %p", hu);
- if (hu->serdev)
- serdev_device_close(hu->serdev);
-
skb_queue_purge(&mrvl->txq);
skb_queue_purge(&mrvl->rawq);
kfree_skb(mrvl->rx_skb);
--
2.39.5