diff mbox series

Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()

Message ID 20201117025917.168761-1-jingxiangfeng@huawei.com
State Accepted
Commit 7f7126b7739d21faafebf8c3abadfdb6a3af102f
Headers show
Series Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware() | expand

Commit Message

Jing Xiangfeng Nov. 17, 2020, 2:59 a.m. UTC
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@huawei.com>
---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Nov. 17, 2020, 3:51 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=385635

---Test result---

##############################
Test: CheckPatch - FAIL
Output:
workflow: Add workflow files for ci
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 49 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] workflow: Add workflow files for ci" has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: CheckGitLint - FAIL
Output:
Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()
1: T1 Title exceeds max length (81>72): "Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()"


##############################
Test: CheckBuildK - PASS



---
Regards,
Linux Bluetooth
Marcel Holtmann Nov. 23, 2020, 11:50 a.m. UTC | #2
Hi Jing,

> 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@huawei.com>

> ---

> drivers/bluetooth/btusb.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)


patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

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;