Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320134
b: refs/heads/master
c: f05393d
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jul 6, 2012
1 parent 6c6f99d commit 1d72242
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37d9ed94b97efdacf1cbff91216920d1a620b8cd
refs/heads/master: f05393d2eb45b3cc9663223c3709134ccef51290
10 changes: 6 additions & 4 deletions trunk/drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create
/* Finally, allocate buffers and video memory */
ret = __vb2_queue_alloc(q, create->memory, num_buffers,
num_planes);
if (ret < 0) {
dprintk(1, "Memory allocation failed with error: %d\n", ret);
return ret;
if (ret == 0) {
dprintk(1, "Memory allocation failed\n");
return -ENOMEM;
}

allocated_buffers = ret;
Expand Down Expand Up @@ -702,7 +702,7 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create

if (ret < 0) {
__vb2_queue_free(q, allocated_buffers);
return ret;
return -ENOMEM;
}

/*
Expand All @@ -726,6 +726,8 @@ int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create)
int ret = __verify_memory_type(q, create->memory, create->format.type);

create->index = q->num_buffers;
if (create->count == 0)
return ret != -EBUSY ? ret : 0;
return ret ? ret : __create_bufs(q, create);
}
EXPORT_SYMBOL_GPL(vb2_create_bufs);
Expand Down

0 comments on commit 1d72242

Please sign in to comment.