Message ID | 4a42c988b7b63fa2804b3ffcb3a1f122e3b9836e.1513872637.git.mchehab@s-opensource.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index cb115ba6a1d2..21017b478a34 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -662,7 +662,8 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, return -EBUSY; } - if (*count == 0 || q->num_buffers != 0 || q->memory != memory) { + if (*count == 0 || q->num_buffers != 0 || + (q->memory && q->memory != memory)) { /* * We already have buffers allocated, so first check if they * are not in use and can be freed.