linux/drivers/media/test-drivers
Hans Verkuil 9cdf371994 media: vivid: fix disappearing <Vendor Command With ID> messages
commit 4bd8a61476 upstream.

The vivid driver supports the <Vendor Command With ID> message,
but if the Vendor ID of the received message didn't match the Vendor ID
of the CEC Adapter, then it ignores it (good) and returns 0 (bad).

It should return -ENOMSG to indicate that other followers should be
asked to handle it. Return code 0 means that the driver handled it,
which is wrong in this case.

As a result, userspace followers never get the chance to process such a
message.

Refactor the code a bit to have the function return -ENOMSG at the end,
drop the default case, and ensure that the message handlers return 0.

That way 0 is only returned if the message is actually handled in the
vivid_received() function.

Fixes: 812765cd69 ("media: vivid: add <Vendor Command With ID> support")
Cc: stable@vger.kernel.org
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-19 16:37:21 +02:00
..
vicodec media: replace obsolete hans.verkuil@cisco.com alias 2024-11-08 13:38:09 +01:00
vidtv media: vidtv: Terminating the subsequent process of initialization failure 2025-04-25 15:14:28 +02:00
vimc media: vimc: skip .s_stream() for stopped entities 2025-03-05 17:40:18 +01:00
visl media: visl: Fix ERANGE error when setting enum controls 2025-02-25 11:11:06 +01:00
vivid media: vivid: fix disappearing <Vendor Command With ID> messages 2025-10-19 16:37:21 +02:00
Kconfig media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API 2023-11-23 13:03:45 +01:00
Makefile media: visl: add virtual stateless decoder driver 2022-11-25 07:32:16 +00:00
vim2m.c media: vim2m: Add parametized support for multiplanar API 2025-04-25 15:14:26 +02:00