]> www.infradead.org Git - users/dwmw2/linux.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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 19 Dec 2024 14:44:43 +0000 (14:44 +0000)
commitd9fecd096f67a4469536e040a8a10bbfb665918b
tree1b43269a21da9a7348ab644be12f9467cacb43df
parent4c2367d46a81d1c291ce05bef2d626fb70771e63
media: uvcvideo: Only save async fh if success

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>
drivers/media/usb/uvc/uvc_ctrl.c