From b17a200f923070104a5b97085ed09ba0f682f637 Mon Sep 17 00:00:00 2001
From: Pawel Osciak
Date: Fri, 10 Sep 2010 02:02:32 -0300
Subject: [PATCH] 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
---
drivers/media/video/mem2mem_testdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.30.2