]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mc-entity.c: use & to check pad flags, not ==
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 4 Feb 2020 18:19:22 +0000 (19:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:34 +0000 (07:18 +0100)
commit72b3f6c85ca1991317d54b4e708fb2ed5c877cbe
treefa2af732edf80bc7b4634a87153088e13d44a1b5
parent7f24642a5c2e663b4693ece4d8950fed26d704ed
media: mc-entity.c: use & to check pad flags, not ==

commit 044041cd5227ec9ccf969f4bf1cc08bffe13b9d3 upstream.

These are bits so to test if a pad is a sink you use & but not ==.

It looks like the only reason this hasn't caused problems before is that
media_get_pad_index() is currently only used with pads that do not set the
MEDIA_PAD_FL_MUST_CONNECT flag. So a pad really had only the SINK or SOURCE
flag set and nothing else.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org> # for v5.3 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/mc/mc-entity.c