usb: gadget: uvc: rework complete handler
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 13 Feb 2024 23:28:02 +0000 (00:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Feb 2024 16:08:30 +0000 (17:08 +0100)
commit58da4e57cb2980c9405575c8de937ebe4ed02202
treeb32754bea26743bcb2bbd150df7ab058db3960f2
parent5e7ea65daf13a95a6cc63d1377e4c500e4e1340f
usb: gadget: uvc: rework complete handler

We refactor the complete handler since the return path with the
locking are really difficult to follow. Just simplify the function by
switching the logic return it on an disabled endpoint early. This way
the second level of indentation can be removed.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240214-uvc-gadget-cleanup-v1-3-de6d78780459@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_video.c