OSDN Git Service

Bluetooth: btusb: Return error code when getting patch status failed
authorMark Chen <mark-yw.chen@mediatek.com>
Mon, 6 Dec 2021 17:33:43 +0000 (01:33 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Dec 2021 16:05:52 +0000 (17:05 +0100)
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>
drivers/bluetooth/btmtk.c

index c2ee5c4..526dfdf 100644 (file)
@@ -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;
                                }
                        }