diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-19 14:00:56 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-06-10 00:30:09 +0300 |
commit | 09f2082e23ad8e89e10152b8701d3511ace45290 (patch) | |
tree | 9d18d835e169f7e88eb9561d5fd11e94968f289b /drivers/media/usb/zr364xx | |
parent | fa8cb6444c3236d2bad7460bdfdb2685f82b7ee4 (diff) | |
download | linux-09f2082e23ad8e89e10152b8701d3511ace45290.tar.xz |
[media] usb drivers: use BUG_ON() instead of if () BUG
Some USB drivers have a logic at the VB buffer handling like:
if (in_interrupt())
BUG();
Use, instead:
BUG_ON(in_interrupt());
Btw, this logic looks weird on my eyes. We should convert them
to use VB2, in order to avoid those crappy things.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/zr364xx')
-rw-r--r-- | drivers/media/usb/zr364xx/zr364xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index ca850316d379..7433ba5c4bad 100644 --- a/drivers/media/usb/zr364xx/zr364xx.c +++ b/drivers/media/usb/zr364xx/zr364xx.c @@ -377,8 +377,7 @@ static void free_buffer(struct videobuf_queue *vq, struct zr364xx_buffer *buf) { _DBG("%s\n", __func__); - if (in_interrupt()) - BUG(); + BUG_ON(in_interrupt()); videobuf_vmalloc_free(&buf->vb); buf->vb.state = VIDEOBUF_NEEDS_INIT; |