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-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a15a5eabae418ff91ebce8de3f6815433b49ad1d;p=linux.git Bluetooth: btusb: Return error code when getting patch status failed commit 995d948cf2e45834275f07afc1c9881a9902e73c upstream. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index c99e1e994cd41..ac90392cce339 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2561,6 +2561,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; } }