Skip to content

Commit

Permalink
Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_…
Browse files Browse the repository at this point in the history
…firmware()

mtk_setup_firmware() misses to call release_firmware() in an error
path. Jump to free_fw to fix it.

Fixes: 737cd06 ("Bluetooth: btmtksdio: fix up firmware download sequence")
Signed-off-by: Jing Xiangfeng <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
hiss2018 authored and Johan Hedberg committed Dec 7, 2020
1 parent d1e9d23 commit b73b578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bluetooth/btmtksdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
err = mtk_hci_wmt_sync(hdev, &wmt_params);
if (err < 0) {
bt_dev_err(hdev, "Failed to power on data RAM (%d)", err);
return err;
goto free_fw;
}

fw_ptr = fw->data;
Expand Down

0 comments on commit b73b578

Please sign in to comment.