Files
linux-stable-mirror/drivers
Xu YangandGreg Kroah-Hartman eb3693454b usb: roles: don't get/set_role() when usb_role_switch is unregistered
commit b787a3e781 upstream.

There is a possibility that usb_role_switch device is unregistered before
the user put usb_role_switch. In this case, the user may still want to
get/set_role() since the user can't sense the changes of usb_role_switch.

This will add a flag to show if usb_role_switch is already registered and
avoid unwanted behaviors.

Fixes: fde0aa6c17 ("usb: common: Small class for USB role switches")
cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240129093739.2371530-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:16:49 +01:00
..
2023-09-19 12:20:19 +02:00
2024-02-23 08:42:30 +01:00
2023-07-27 08:44:00 +02:00
2024-02-23 08:42:32 +01:00
2023-11-20 11:06:50 +01:00
2024-02-23 08:42:29 +01:00
2024-02-23 08:42:03 +01:00
2024-01-25 14:37:38 -08:00
2023-07-27 08:44:02 +02:00