summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2024-02-14 02:28:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-17 19:08:29 +0300
commited6cbac8ba2dd01aa12283b19243da8b66396f86 (patch)
tree7cac53f8d875c6a52f6fd0425882c1d4d83983b2
parent56403220577b95276b8080e8480adc7e1f9d43ec (diff)
downloadlinux-ed6cbac8ba2dd01aa12283b19243da8b66396f86.tar.xz
usb: gadget: uvc: drop unnecessary check for always set req
The pump function is running in an while(1) loop. The only case this loop will be escaped is the two breaks. In both cases the req is valid. Therefor the check for an not set req can be dropped and setting the req to NULL does also has never any effect. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Link: https://lore.kernel.org/r/20240214-uvc-gadget-cleanup-v1-1-de6d78780459@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/function/uvc_video.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index dd3241fc6939..b17c61c93265 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -623,14 +623,7 @@ static void uvcg_video_pump(struct work_struct *work)
uvcg_queue_cancel(queue, 0);
break;
}
-
- /* The request is owned by the endpoint / ready list. */
- req = NULL;
}
-
- if (!req)
- return;
-
spin_lock_irqsave(&video->req_lock, flags);
if (video->is_enabled)
list_add_tail(&req->list, &video->req_free);