V4L/DVB: v4l: mem2mem_testdev: fix errorenous comparison
authorPawel Osciak <p.osciak@samsung.com>
Fri, 10 Sep 2010 05:02:32 +0000 (02:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 28 Sep 2010 01:22:08 +0000 (22:22 -0300)
Output buffer has to be at least the size of input buffer, not the other
way around.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mem2mem_testdev.c

index 4525335f9bd416388484cbc5872ea0db3c3af768..d31ec25650561cc8dcfb8c2f7ac9bef0d1ba3c11 100644 (file)
@@ -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;
        }