linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] media: pci: saa7164: Replace BUG() with BUG_ON()
@ 2016-12-24 22:31 Shyam Saini
  2016-12-24 22:31 ` [PATCH 2/4] " Shyam Saini
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Shyam Saini @ 2016-12-24 22:31 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media, Shyam Saini

Replace BUG() with BUG_ON() using coccinelle

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
---
 drivers/media/pci/saa7164/saa7164-buffer.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c b/drivers/media/pci/saa7164/saa7164-buffer.c
index 62c3450..7d28d46 100644
--- a/drivers/media/pci/saa7164/saa7164-buffer.c
+++ b/drivers/media/pci/saa7164/saa7164-buffer.c
@@ -266,15 +266,13 @@ int saa7164_buffer_cfg_port(struct saa7164_port *port)
 	list_for_each_safe(c, n, &port->dmaqueue.list) {
 		buf = list_entry(c, struct saa7164_buffer, list);
 
-		if (buf->flags != SAA7164_BUFFER_FREE)
-			BUG();
+		BUG_ON(buf->flags != SAA7164_BUFFER_FREE);
 
 		/* Place the buffer in the h/w queue */
 		saa7164_buffer_activate(buf, i);
 
 		/* Don't exceed the device maximum # bufs */
-		if (i++ > port->hwcfg.buffercount)
-			BUG();
+		BUG_ON(i++ > port->hwcfg.buffercount);
 
 	}
 	mutex_unlock(&port->dmaqueue_lock);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-03 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-24 22:31 [PATCH 1/4] media: pci: saa7164: Replace BUG() with BUG_ON() Shyam Saini
2016-12-24 22:31 ` [PATCH 2/4] " Shyam Saini
2016-12-24 22:31 ` [PATCH 3/4] " Shyam Saini
2016-12-24 22:31 ` [PATCH 4/4] " Shyam Saini
2017-02-03 13:46 ` [PATCH 1/4] " Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).