Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae24601b authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds
Browse files

V4L/DVB (3485): BUG_ON() Conversion in drivers/video/media

parent 9d9d6bae
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -116,8 +116,7 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
		pg = vmalloc_to_page(virt);
		pg = vmalloc_to_page(virt);
		if (NULL == pg)
		if (NULL == pg)
			goto err;
			goto err;
		if (PageHighMem(pg))
		BUG_ON(PageHighMem(pg));
			BUG();
		sglist[i].page   = pg;
		sglist[i].page   = pg;
		sglist[i].length = PAGE_SIZE;
		sglist[i].length = PAGE_SIZE;
	}
	}
+2 −4
Original line number Original line Diff line number Diff line
@@ -37,8 +37,7 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
	struct saa7146_dev *dev = fh->dev;
	struct saa7146_dev *dev = fh->dev;
	struct saa7146_vv *vv = dev->vv_data;
	struct saa7146_vv *vv = dev->vv_data;


	if ((fh->resources & bits) != bits)
	BUG_ON((fh->resources & bits) != bits);
		BUG();


	mutex_lock(&dev->lock);
	mutex_lock(&dev->lock);
	fh->resources  &= ~bits;
	fh->resources  &= ~bits;
@@ -55,8 +54,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf)
{
{
	DEB_EE(("dev:%p, buf:%p\n",dev,buf));
	DEB_EE(("dev:%p, buf:%p\n",dev,buf));


	if (in_interrupt())
	BUG_ON(in_interrupt());
		BUG();


	videobuf_waiton(&buf->vb,0,0);
	videobuf_waiton(&buf->vb,0,0);
	videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma);
	videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma);
+2 −4
Original line number Original line Diff line number Diff line
@@ -1090,11 +1090,9 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
	struct av7110 *av7110;
	struct av7110 *av7110;


	/* pointer casting paranoia... */
	/* pointer casting paranoia... */
	if (!demux)
	BUG_ON(!demux);
		BUG();
	dvbdemux = (struct dvb_demux *) demux->priv;
	dvbdemux = (struct dvb_demux *) demux->priv;
	if (!dvbdemux)
	BUG_ON(!dvbdemux);
		BUG();
	av7110 = (struct av7110 *) dvbdemux->priv;
	av7110 = (struct av7110 *) dvbdemux->priv;


	dprintk(4, "%p\n", av7110);
	dprintk(4, "%p\n", av7110);
+1 −2
Original line number Original line Diff line number Diff line
@@ -688,8 +688,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
				memcpy(ttusb->muxpack + ttusb->muxpack_ptr,
				memcpy(ttusb->muxpack + ttusb->muxpack_ptr,
				       data, avail);
				       data, avail);
				ttusb->muxpack_ptr += avail;
				ttusb->muxpack_ptr += avail;
				if (ttusb->muxpack_ptr > 264)
				BUG_ON(ttusb->muxpack_ptr > 264);
					BUG();
				data += avail;
				data += avail;
				len -= avail;
				len -= avail;
				/* determine length */
				/* determine length */
+1 −2
Original line number Original line Diff line number Diff line
@@ -511,8 +511,7 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
void
void
bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf)
bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf)
{
{
	if (in_interrupt())
	BUG_ON(in_interrupt());
		BUG();
	videobuf_waiton(&buf->vb,0,0);
	videobuf_waiton(&buf->vb,0,0);
	videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma);
	videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma);
	videobuf_dma_free(&buf->vb.dma);
	videobuf_dma_free(&buf->vb.dma);
Loading