[media] videobuf2-core: Replace BUG_ON and return an error at vb2_queue_init()
authorEzequiel Garcia <elezegarcia@gmail.com>
Mon, 17 Sep 2012 17:59:30 +0000 (14:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Sep 2012 09:09:10 +0000 (06:09 -0300)
commit896f38f582730a19eb49677105b4fe4c0270b82e
tree70b769ece5f928d4b5e5cfe2f586f3882fb2acf2
parent4195ec7a8fa253cb7e598a8f99f005bc97d4ac15
[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>
drivers/media/v4l2-core/videobuf2-core.c
include/media/videobuf2-core.h