Bluetooth: btusb: Fix short read errors in btusb_qca_send_vendor_req()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jul 2026 15:57:34 +0000 (17:57 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 28 Jul 2026 20:13:48 +0000 (16:13 -0400)
commitcac43d360c928bc0cbbd18809632388265649761
treef42f27c699efc86f755bbe3515153ca969131c27
parent0cc4b5649ae83deb8222100dba31aa0f100a19cd
Bluetooth: btusb: Fix short read errors in btusb_qca_send_vendor_req()

If btusb_qca_send_vendor_req() gets a "short" read from a device, it
will accidentally treat that as a "real" read and populate the returned
value with some unknown and probably totally invalid data.

Fix this logic error up by calling usb_control_msg_recv() which
guarantees a "full" read happens, and then simplify the error checking
for when btusb_qca_send_vendor_req() is called.

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btusb.c