Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 222964ea authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab
Browse files

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: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 95f5cbff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
	}
}