Commit b17a200f authored by Pawel Osciak's avatar Pawel Osciak Committed by Mauro Carvalho Chehab

V4L/DVB: v4l: mem2mem_testdev: fix errorenous comparison

Output buffer has to be at least the size of input buffer, not the other
way around.
Signed-off-by: default avatarPawel Osciak <p.osciak@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 23f0cb62
......@@ -239,7 +239,7 @@ static int device_process(struct m2mtest_ctx *ctx,
return -EFAULT;
}
if (in_buf->vb.size < out_buf->vb.size) {
if (in_buf->vb.size > out_buf->vb.size) {
v4l2_err(&dev->v4l2_dev, "Output buffer is too small\n");
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment