linux/drivers/usb/class
Jun Yan 8309c947b2 USB: usblp: return error when setting unsupported protocol
commit 7a3d76a0b6 upstream.

Fix the regression introduced by commit d8c6edfa3f ("USB:
usblp: don't call usb_set_interface if there's a single alt"),
which causes that unsupported protocols can also be set via
ioctl when the num_altsetting of the device is 1.

Move the check for protocol support to the earlier stage.

Fixes: d8c6edfa3f ("USB: usblp: don't call usb_set_interface if there's a single alt")
Cc: stable <stable@kernel.org>
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Link: https://lore.kernel.org/r/20241212143852.671889-1-jerrysteve1101@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-01-23 17:15:53 +01:00
..
cdc-acm.c USB: class: CDC-ACM: fix race between get_serial and set_serial 2024-10-17 15:11:12 +02:00
cdc-acm.h USB: cdc-acm: fix minor-number release 2021-09-14 10:33:40 +02:00
cdc-wdm.c USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages 2024-07-05 09:14:14 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
usblp.c USB: usblp: return error when setting unsupported protocol 2025-01-23 17:15:53 +01:00
usbtmc.c USB: usbtmc: prevent kernel-usb-infoleak 2024-10-17 15:10:42 +02:00