diff options
author | Ezequiel Garcia <elezegarcia@gmail.com> | 2012-09-17 13:59:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-27 05:09:10 -0400 |
commit | 896f38f582730a19eb49677105b4fe4c0270b82e (patch) | |
tree | 70b769ece5f928d4b5e5cfe2f586f3882fb2acf2 /include/media | |
parent | 4195ec7a8fa253cb7e598a8f99f005bc97d4ac15 (diff) |
[media] videobuf2-core: Replace BUG_ON and return an error at vb2_queue_init()
This replaces BUG_ON() calls with WARN_ON(), and returns
EINVAL if some parameter is NULL, as suggested by Jonathan and Mauro.
The BUG_ON() call is too drastic to be used in this case.
See the full discussion here:
http://www.spinics.net/lists/linux-media/msg52462.html
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/videobuf2-core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 8dd9b6cc296b..e04252a9fea6 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -324,7 +324,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req); | |||
324 | int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create); | 324 | int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create); |
325 | int vb2_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b); | 325 | int vb2_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b); |
326 | 326 | ||
327 | int vb2_queue_init(struct vb2_queue *q); | 327 | int __must_check vb2_queue_init(struct vb2_queue *q); |
328 | 328 | ||
329 | void vb2_queue_release(struct vb2_queue *q); | 329 | void vb2_queue_release(struct vb2_queue *q); |
330 | 330 | ||