[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117024332.165771-1-jingxiangfeng@huawei.com>
Date: Tue, 17 Nov 2020 10:43:32 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: <marcel@...tmann.org>, <johan.hedberg@...il.com>,
<matthias.bgg@...il.com>, <Mark-YW.Chen@...iatek.com>,
<sean.wang@...iatek.com>
CC: <linux-bluetooth@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <jingxiangfeng@...wei.com>
Subject: [PATCH] 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@...wei.com>
---
drivers/bluetooth/btmtksdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index c7ab7a23bd67..c2677ffbd3c0 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;
--
2.17.1
Powered by blists - more mailing lists