diff options
| author | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-09-06 12:11:21 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-09-09 16:12:56 +0200 |
| commit | 4bd8a6147645480d550242ff816b4c7ba160e5b7 (patch) | |
| tree | e32bddf04661b9fe928e46fa1e8296c31969f63b /rust/helpers/err.c | |
| parent | dcf6fb89e6f73b6cbb17dfcdf608422c0b7beed6 (diff) | |
media: vivid: fix disappearing <Vendor Command With ID> messages
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: 812765cd6954 ("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>
Diffstat (limited to 'rust/helpers/err.c')
0 files changed, 0 insertions, 0 deletions
