Skip to content

Commit

Permalink
Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setu…
Browse files Browse the repository at this point in the history
…p_firmware()

[ Upstream commit d1e9d23 ]

btusb_mtk_setup_firmware() misses to call release_firmware() in an error
path. Jump to err_release_fw to fix it.

Fixes: f645125 ("Bluetooth: btusb: fix up firmware download sequence")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
hiss2018 authored and gregkh committed Dec 30, 2020
1 parent 848120a commit ae0e737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bluetooth/btusb.c
Expand Up @@ -3067,7 +3067,7 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
err = btusb_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 err_release_fw;
}

fw_ptr = fw->data;
Expand Down

0 comments on commit ae0e737

Please sign in to comment.