Bluetooth: btusb: Handle download_firmware failure cases
authorMark Chen <mark-yw.chen@mediatek.com>
Mon, 6 Dec 2021 17:33:42 +0000 (01:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:31 +0000 (11:03 +0100)
commitd41946e82718c3a4023ada6583ce026c21159021
treee5e917cf6beeaf1b5e5b747485c8eaa7907384d1
parent006157d575d146255963ffbc81855929accb5993
Bluetooth: btusb: Handle download_firmware failure cases

[ Upstream commit 00c0ee9850b7b0cb7c40b8daba806ae2245e59d4 ]

For Mediatek chipset, it can not enabled if there are something wrong
in btmtk_setup_firmware_79xx(). Thus, the process must be terminated
and returned error code.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c