mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Bluetooth: hci_ll: Fix download_firmware() return when __hci_cmd_sync fails
When __hci_cmd_sync() fails, download_firmware() should also fail, and
the same error value should be returned as PTR_ERR(skb).
Without this fix, download_firmware() will return a success when it actually
failed in __hci_cmd_sync().
Fixes: 371805522f ("bluetooth: hci_uart: add LL protocol serdev driver support")
Signed-off-by: Guodong Xu <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
3a21bf586d
commit
823b84201f
1 changed files with 1 additions and 0 deletions
|
|
@ -624,6 +624,7 @@ static int download_firmware(struct ll_device *lldev)
|
|||
skb = __hci_cmd_sync(lldev->hu.hdev, cmd->opcode, cmd->plen, &cmd->speed, HCI_INIT_TIMEOUT);
|
||||
if (IS_ERR(skb)) {
|
||||
bt_dev_err(lldev->hu.hdev, "send command failed\n");
|
||||
err = PTR_ERR(skb);
|
||||
goto out_rel_fw;
|
||||
}
|
||||
kfree_skb(skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue