diff mbox series

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

Message ID 20211213092622.3508694-4-vicamo.yang@canonical.com
State New
Headers show
Series None | expand

Commit Message

You-Sheng Yang Dec. 13, 2021, 9:26 a.m. UTC
From: Mark Chen <mark-yw.chen@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@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Mark Chen <mark-yw.chen@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@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@canonical.com>
---
 drivers/bluetooth/btusb.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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;
 				}
 			}