]> 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>
Thu, 13 Mar 2025 11:50:50 +0000 (12:50 +0100)
commitd775f9e9e663690d702ca29da0b18f8bdd7a6e37
tree00a63b55b018f0cc9bf0442639e09a0bc25aaefa
parente0360e0099047898eca2dab42ca404919df045db
media: uvcvideo: Only save async fh if success

[ Upstream commit d9fecd096f67a4469536e040a8a10bbfb665918b ]

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: Sasha Levin <sashal@kernel.org>
drivers/media/usb/uvc/uvc_ctrl.c