Message ID | 20230321072707.678039-3-alexander.stein@ew.tq-group.com |
---|---|
State | Accepted |
Commit | 6cf9e3572ee8aa4d8e847850cedf45e12ac94cfe |
Headers | show |
Series | imx7-media-csi: small cleanup | expand |
diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 3e97b9f2ff69..389d7d88b341 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -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: