[PATCH 2/2][OEM-5.13/OEM-5.14/Impish] UBUNTU: SAUCE: Bluetooth: btusb: Return error code when getting patch status failed

You-Sheng Yang vicamo.yang at canonical.com
Mon Dec 13 09:26:21 UTC 2021


From: Mark Chen <mark-yw.chen at mediatek.com>

BugLink: https://bugs.launchpad.net/bugs/1954300

If there are failure cases in getting patch status, it should return the
error code (-EIO).

Fixes: fc342c4dc4087 ("Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices")
Co-developed-by: Sean Wang <sean.wang at mediatek.com>
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
Signed-off-by: Mark Chen <mark-yw.chen at mediatek.com>
Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
(backported from
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=995d948cf2e45834275f07afc1c9881a9902e73c)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/bluetooth/btusb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 96b2401106d5..8b84be970775 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3555,6 +3555,7 @@ static int btusb_mtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwnam
 				} else {
 					bt_dev_err(hdev, "Failed wmt patch dwnld status (%d)",
 						   status);
+					err = -EIO;
 					goto err_release_fw;
 				}
 			}
-- 
2.32.0




More information about the kernel-team mailing list