summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-06 13:00:30 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-11 18:32:09 +0300
commit3b6813d6f52d18674e5bbfcf7ff4bcec15569144 (patch)
tree916295de7d11aa54ffd4fbcb5402a36c37bc23c2 /drivers
parent8307f0ab0331ad8b8bb8af85df372e6bfda688e7 (diff)
downloadlinux-3b6813d6f52d18674e5bbfcf7ff4bcec15569144.tar.xz
media: vicodec: stateless codecs do not have EOS and SOURCE_CHANGE events
Return an error when attempting to subscribe to those events for a stateless codec. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/vicodec/vicodec-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index ce7f7bf1b998..91cd0c1dbede 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -1293,6 +1293,8 @@ static int vicodec_subscribe_event(struct v4l2_fh *fh,
return -EINVAL;
/* fall through */
case V4L2_EVENT_EOS:
+ if (ctx->is_stateless)
+ return -EINVAL;
return v4l2_event_subscribe(fh, sub, 0, NULL);
default:
return v4l2_ctrl_subscribe_event(fh, sub);