Commit cac43d3
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>1 parent 0cc4b56 commit cac43d3
1 file changed
Lines changed: 9 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3424 | 3424 | | |
3425 | 3425 | | |
3426 | 3426 | | |
3427 | | - | |
3428 | | - | |
3429 | | - | |
3430 | | - | |
3431 | | - | |
3432 | | - | |
| 3427 | + | |
3433 | 3428 | | |
3434 | 3429 | | |
3435 | 3430 | | |
3436 | 3431 | | |
3437 | | - | |
3438 | | - | |
3439 | | - | |
3440 | | - | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
3441 | 3436 | | |
3442 | | - | |
3443 | | - | |
3444 | | - | |
3445 | | - | |
3446 | | - | |
3447 | | - | |
3448 | | - | |
3449 | 3437 | | |
3450 | 3438 | | |
3451 | 3439 | | |
| |||
3652 | 3640 | | |
3653 | 3641 | | |
3654 | 3642 | | |
3655 | | - | |
| 3643 | + | |
3656 | 3644 | | |
3657 | 3645 | | |
3658 | 3646 | | |
| |||
3670 | 3658 | | |
3671 | 3659 | | |
3672 | 3660 | | |
3673 | | - | |
| 3661 | + | |
3674 | 3662 | | |
3675 | 3663 | | |
3676 | 3664 | | |
| |||
3693 | 3681 | | |
3694 | 3682 | | |
3695 | 3683 | | |
3696 | | - | |
| 3684 | + | |
3697 | 3685 | | |
3698 | 3686 | | |
3699 | 3687 | | |
| |||
3704 | 3692 | | |
3705 | 3693 | | |
3706 | 3694 | | |
3707 | | - | |
| 3695 | + | |
3708 | 3696 | | |
3709 | 3697 | | |
3710 | 3698 | | |
| |||
0 commit comments