summaryrefslogtreecommitdiff
path: root/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c')
-rw-r--r--drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
index a0b398aa2596..07564e05ed8c 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c
@@ -477,6 +477,9 @@ static int rvin_g_selection(struct file *file, void *fh,
struct rvin_dev *vin = video_drvdata(file);
int ret;
+ if (!vin->scaler)
+ return -ENOIOCTLCMD;
+
if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
@@ -520,6 +523,9 @@ static int rvin_s_selection(struct file *file, void *fh,
};
int ret;
+ if (!vin->scaler)
+ return -ENOIOCTLCMD;
+
if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;