mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02: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: stable@vger.kernel.org Signed-off-by: Gongwei Li <ligongwei@kylinos.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
44c98fd082
commit
a935579934
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user