Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: uvcvideo: Avoid variable shadowing in uvc_ctrl_cleanup_fh

This avoids a variable loop shadowing occurring between the local loop
iterating through the uvc_entity's controls and the global one going
through the pending async controls of the file handle.

Fixes: 10acb9101355 ("media: uvcvideo: Increase/decrease the PM counter per IOCTL")
Cc: stable@vger.kernel.org
Signed-off-by: Desnes Nunes <desnesn@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Desnes Nunes and committed by
Hans Verkuil
f4da0de6 e67b5f83

+1 -2
+1 -2
drivers/media/usb/uvc/uvc_ctrl.c
··· 3307 3307 void uvc_ctrl_cleanup_fh(struct uvc_fh *handle) 3308 3308 { 3309 3309 struct uvc_entity *entity; 3310 - int i; 3311 3310 3312 3311 guard(mutex)(&handle->chain->ctrl_mutex); 3313 3312 ··· 3324 3325 if (!WARN_ON(handle->pending_async_ctrls)) 3325 3326 return; 3326 3327 3327 - for (i = 0; i < handle->pending_async_ctrls; i++) 3328 + for (unsigned int i = 0; i < handle->pending_async_ctrls; i++) 3328 3329 uvc_pm_put(handle->stream->dev); 3329 3330 } 3330 3331