[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117025917.168761-1-jingxiangfeng@huawei.com>
Date: Tue, 17 Nov 2020 10:59:17 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: <marcel@...tmann.org>, <johan.hedberg@...il.com>,
<Mark-YW.Chen@...iatek.com>, <sean.wang@...iatek.com>
CC: <linux-bluetooth@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<jingxiangfeng@...wei.com>
Subject: [PATCH] Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()
btusb_mtk_setup_firmware() misses to call release_firmware() in an error
path. Jump to err_release_fw to fix it.
Fixes: f645125711c8 ("Bluetooth: btusb: fix up firmware download sequence")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
---
drivers/bluetooth/btusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 8d2608ddfd08..14231a5f3474 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3043,7 +3043,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;
--
2.17.1
Powered by blists - more mailing lists