From: Pawel Osciak
Date: Fri, 10 Sep 2010 05:02:32 +0000 (-0300)
Subject: V4L/DVB: v4l: mem2mem_testdev: fix errorenous comparison
X-Git-Tag: firefly_0821_release~7613^2~3803^2~10
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b17a200f923070104a5b97085ed09ba0f682f637;p=firefly-linux-kernel-4.4.55.git
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: Pawel Osciak
Signed-off-by: Kyungmin Park
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c
index 4525335f9bd4..d31ec2565056 100644
--- a/drivers/media/video/mem2mem_testdev.c
+++ b/drivers/media/video/mem2mem_testdev.c
@@ -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;
}