]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: uvcvideo: Only save async fh if success
authorRicardo Ribalda <ribalda@chromium.org>
Tue, 3 Dec 2024 21:20:08 +0000 (21:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:35 +0000 (10:05 +0100)
commit34fb9eb31d66ce10946c0228ccdced9cbd5542a7
treec0d4e959455ba36ac155a28a3da054c8d0dd6e33
parentac7737ed9aee8daf5fff3334ea35abd8adbbd3e6
media: uvcvideo: Only save async fh if success

commit d9fecd096f67a4469536e040a8a10bbfb665918b upstream.

Now we keep a reference to the active fh for any call to uvc_ctrl_set,
regardless if it is an actual set or if it is a just a try or if the
device refused the operation.

We should only keep the file handle if the device actually accepted
applying the operation.

Cc: stable@vger.kernel.org
Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives")
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-1-26c867231118@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/uvc/uvc_ctrl.c