summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btmtksdio.c
diff options
context:
space:
mode:
authorJing Xiangfeng <jingxiangfeng@huawei.com>2020-11-17 05:43:32 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2020-12-07 18:00:12 +0300
commitb73b5781a85c03113476f62346c390f0277baa4b (patch)
treed1f101fec60034ffe3cd2bc5eda9dbaaa0be0eb3 /drivers/bluetooth/btmtksdio.c
parentd1e9d232e1e60fa63df1b836ec3ecba5abd3fa9d (diff)
downloadlinux-b73b5781a85c03113476f62346c390f0277baa4b.tar.xz
Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware()
mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to free_fw to fix it. Fixes: 737cd06072a7 ("Bluetooth: btmtksdio: 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>
Diffstat (limited to 'drivers/bluetooth/btmtksdio.c')
-rw-r--r--drivers/bluetooth/btmtksdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index ba45c59bd9f3..5f9f02795631 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -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;