diff options
author | Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> | 2018-05-08 11:07:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-27 06:39:57 -0400 |
commit | 222964eaf2472053221341c331eb81e87c8b04f2 (patch) | |
tree | b01a21c338d173991caf23d345ec434189aea9f1 | |
parent | 95f5cbff90b9e4324839a5c28ee3153a3c9921a5 (diff) | |
download | linux-222964eaf2472053221341c331eb81e87c8b04f2.tar.bz2 |
media: uvcvideo: Remove a redundant check
Event subscribers cannot have a NULL file handle. They are only added
at a single location in the code, and the .fh pointer is used without
checking there.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/usb/uvc/uvc_ctrl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 4042cbdb721b..12b5be66fd2f 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1229,9 +1229,9 @@ static void uvc_ctrl_send_event(struct uvc_fh *handle, uvc_ctrl_fill_event(handle->chain, &ev, ctrl, mapping, value, changes); list_for_each_entry(sev, &mapping->ev_subs, node) { - if (sev->fh && (sev->fh != &handle->vfh || + if (sev->fh != &handle->vfh || (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK) || - (changes & V4L2_EVENT_CTRL_CH_FLAGS))) + (changes & V4L2_EVENT_CTRL_CH_FLAGS)) v4l2_event_queue_fh(sev->fh, &ev); } } |