mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
Bluetooth: hci_uart: Fix false success return in hci_uart_setup()
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:fb2ce8d11f("Bluetooth: hci_uart: Add support for vendor detection flag") Fixes:82f5169bf3("Bluetooth: hci_uart: add serdev driver support library") Cc: [email protected] Signed-off-by: Gongwei Li <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
This commit is contained in:
1 parent
44c98fd082
commit
a935579934
2 files changed
+2
-2
No files matched your search
@@ -457,7 +457,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)) {
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user