usb: gadget: uvc: configfs: ensure guid to be valid before set
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 21 Feb 2024 22:14:47 +0000 (23:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2024 09:42:28 +0000 (10:42 +0100)
commitf7a7f80ccc8df017507e2b1e1dd652361374d25b
tree5ac4f2a29a925714f91185fb82888475b8e1db83
parent7a700d8f2431b681f2dae1118d62177719912f5d
usb: gadget: uvc: configfs: ensure guid to be valid before set

When setting the guid via configfs it is possible to test if
its value is one of the kernel supported ones by calling
uvc_format_by_guid on it. If the result is NULL, we know the
guid is unsupported and can be ignored.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240221-uvc-gadget-configfs-guid-v1-1-f0678ca62ebb@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_configfs.c