[media] s5p_mfc: correct the loop condition
authorZhaowei Yuan <zhaowei.yuan@samsung.com>
Thu, 4 Sep 2014 02:28:06 +0000 (23:28 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 26 Sep 2014 09:47:45 +0000 (06:47 -0300)
It should take ctx->dst_fmt->num_planes as
the loop condition for CAPTURE.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c

index fe4d21ccfd49a78cb6f056e151f2d6e1bac29492..9e47b969853ba32feab8ef4364e6490b006dbe5e 100644 (file)
@@ -990,7 +990,7 @@ static int s5p_mfc_buf_init(struct vb2_buffer *vb)
        if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
                if (ctx->capture_state == QUEUE_BUFS_MMAPED)
                        return 0;
-               for (i = 0; i <= ctx->src_fmt->num_planes ; i++) {
+               for (i = 0; i < ctx->dst_fmt->num_planes; i++) {
                        if (IS_ERR_OR_NULL(ERR_PTR(
                                        vb2_dma_contig_plane_dma_addr(vb, i)))) {
                                mfc_err("Plane mem not allocated\n");
This page took 0.028648 seconds and 5 git commands to generate.