Skip to content

Commit 02baaa0

Browse files
ribaldamchehab
authored andcommitted
media: uvcvideo: Annotate lock requirements for uvc_ctrl_set
Make it explicit that the function is always called with ctrl_mutex being held. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-4-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 221cd51 commit 02baaa0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/media/usb/uvc/uvc_ctrl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,8 @@ int uvc_ctrl_set(struct uvc_fh *handle,
19811981
s32 max;
19821982
int ret;
19831983

1984+
lockdep_assert_held(&chain->ctrl_mutex);
1985+
19841986
if (__uvc_query_v4l2_class(chain, xctrl->id, 0) >= 0)
19851987
return -EACCES;
19861988

0 commit comments

Comments
 (0)