Skip to content

Commit 823b842

Browse files
docularxuholtmann
authored andcommitted
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: 3718055 ("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]>
1 parent 3a21bf5 commit 823b842

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/bluetooth/hci_ll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ static int download_firmware(struct ll_device *lldev)
624624
skb = __hci_cmd_sync(lldev->hu.hdev, cmd->opcode, cmd->plen, &cmd->speed, HCI_INIT_TIMEOUT);
625625
if (IS_ERR(skb)) {
626626
bt_dev_err(lldev->hu.hdev, "send command failed\n");
627+
err = PTR_ERR(skb);
627628
goto out_rel_fw;
628629
}
629630
kfree_skb(skb);

0 commit comments

Comments
 (0)