* [PATCH] Bluetooth: hci_uart: Fix false success return in hci_uart_setup()
@ 2026-08-21 2:45 Gongwei Li
2026-08-21 19:50 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Gongwei Li @ 2026-08-21 2:45 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz
Cc: Johan Hedberg, Pavel Machek, Sebastian Reichel, Rob Herring,
linux-bluetooth, linux-kernel, Gongwei Li, stable
From: Gongwei Li <ligongwei@kylinos.cn>
When reading the local version information for vendor detection
fails, the error is only printed and 0 is returned, which masks the
setup failure from the HCI core.
Return PTR_ERR(skb) instead.
Fixes: fb2ce8d11f039 ("Bluetooth: hci_uart: Add support for vendor detection flag")
Fixes: 82f5169bf3d3b ("Bluetooth: hci_uart: add serdev driver support library")
Cc: stable@vger.kernel.org
Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
---
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/bluetooth/hci_serdev.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 2ad42c3bbaac..27644d2e53f8 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -451,7 +451,7 @@ static int hci_uart_setup(struct hci_dev *hdev)
if (IS_ERR(skb)) {
BT_ERR("%s: Reading local version information failed (%ld)",
hdev->name, PTR_ERR(skb));
- return 0;
+ return PTR_ERR(skb);
}
if (skb->len != sizeof(*ver)) {
diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c
index 593d9cefbbf9..d2eaf2f12aa2 100644
--- a/drivers/bluetooth/hci_serdev.c
+++ b/drivers/bluetooth/hci_serdev.c
@@ -221,7 +221,7 @@ static int hci_uart_setup(struct hci_dev *hdev)
if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading local version info failed (%ld)",
PTR_ERR(skb));
- return 0;
+ return PTR_ERR(skb);
}
if (skb->len != sizeof(*ver))
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Bluetooth: hci_uart: Fix false success return in hci_uart_setup()
2026-08-21 2:45 [PATCH] Bluetooth: hci_uart: Fix false success return in hci_uart_setup() Gongwei Li
@ 2026-08-21 19:50 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2026-08-21 19:50 UTC (permalink / raw)
To: Gongwei Li
Cc: marcel, luiz.dentz, johan.hedberg, pavel, sre, robh,
linux-bluetooth, linux-kernel, ligongwei, stable
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 21 Aug 2026 10:45:55 +0800 you wrote:
> From: Gongwei Li <ligongwei@kylinos.cn>
>
> When reading the local version information for vendor detection
> fails, the error is only printed and 0 is returned, which masks the
> setup failure from the HCI core.
>
> Return PTR_ERR(skb) instead.
>
> [...]
Here is the summary with links:
- Bluetooth: hci_uart: Fix false success return in hci_uart_setup()
https://git.kernel.org/bluetooth/bluetooth-next/c/b8d936018ce2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-21 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 2:45 [PATCH] Bluetooth: hci_uart: Fix false success return in hci_uart_setup() Gongwei Li
2026-08-21 19:50 ` patchwork-bot+bluetooth
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®