From: Mark Chen Date: Mon, 6 Dec 2021 17:33:43 +0000 (+0800) Subject: Bluetooth: btusb: Return error code when getting patch status failed X-Git-Tag: v5.17-rc1~170^2~110^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=995d948cf2e45834275f07afc1c9881a9902e73c;p=thirdparty%2Flinux.git Bluetooth: btusb: Return error code when getting patch status failed 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 Signed-off-by: Sean Wang Signed-off-by: Mark Chen Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c index c2ee5c4b975a2..526dfdf1fe019 100644 --- a/drivers/bluetooth/btmtk.c +++ b/drivers/bluetooth/btmtk.c @@ -121,6 +121,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, } else { bt_dev_err(hdev, "Failed wmt patch dwnld status (%d)", status); + err = -EIO; goto err_release_fw; } }