summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2024-12-03 22:20:09 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2024-12-19 15:44:43 +0100
commit04d3398f66d2d31c4b8caea88f051a4257b7a161 (patch)
tree74e5aef8366e21e82694906cb2103c562410297f /drivers/media/usb
parentmedia: uvcvideo: Only save async fh if success (diff)
downloadlinux-04d3398f66d2d31c4b8caea88f051a4257b7a161.tar.xz
linux-04d3398f66d2d31c4b8caea88f051a4257b7a161.zip
media: uvcvideo: Remove redundant NULL assignment
ctrl->handle will only be different than NULL for controls that have mappings. This is because that assignment is only done inside uvc_ctrl_set() for mapped controls. Cc: stable@vger.kernel.org Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") 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-2-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/uvc/uvc_ctrl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index e0806641a8d0..b05b84887e51 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1640,10 +1640,8 @@ bool uvc_ctrl_status_event_async(struct urb *urb, struct uvc_video_chain *chain,
struct uvc_device *dev = chain->dev;
struct uvc_ctrl_work *w = &dev->async_ctrl;
- if (list_empty(&ctrl->info.mappings)) {
- ctrl->handle = NULL;
+ if (list_empty(&ctrl->info.mappings))
return false;
- }
w->data = data;
w->urb = urb;