vb->memory = memory;
for (plane = 0; plane < num_planes; ++plane)
vb->planes[plane].length = q->plane_sizes[plane];
+ q->bufs[vb->index] = vb;
/* Allocate video buffer memory for the MMAP type */
if (memory == VB2_MEMORY_MMAP) {
dprintk(1, "failed allocating memory for "
"buffer %d\n", buffer);
kfree(vb);
+ q->bufs[vb->index] = NULL;
break;
}
/*
dprintk(1, "buffer %d %p initialization"
" failed\n", buffer, vb);
__vb2_buf_mem_free(vb);
+ q->bufs[vb->index] = NULL;
kfree(vb);
break;
}
}
-
- q->bufs[q->num_buffers + buffer] = vb;
}
if (memory == VB2_MEMORY_MMAP)