mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
media: imx: imx7-media-csi: Fail on invalid type in VIDIOC_G_SELECTION
This device only supports video capture, so bail out if invalid selection type is passed. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
e6f68b1c40
commit
6cf9e3572e
@ -1214,6 +1214,9 @@ static int imx7_csi_video_g_selection(struct file *file, void *fh,
|
||||
{
|
||||
struct imx7_csi *csi = video_drvdata(file);
|
||||
|
||||
if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
switch (s->target) {
|
||||
case V4L2_SEL_TGT_COMPOSE:
|
||||
case V4L2_SEL_TGT_COMPOSE_DEFAULT:
|
||||
|
Loading…
Reference in New Issue
Block a user