From: Eric Sesterhenn Date: Thu, 30 Nov 2006 04:26:46 +0000 (+0100) Subject: BUG_ON conversion for drivers/media/video/pwc/pwc-if.c X-Git-Tag: v2.6.20-rc2~6^2~13^2~481^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5d9a276a3eb073251737cb92b790bfdb9f0b9139;p=linux-2.6-omap-h63xx.git BUG_ON conversion for drivers/media/video/pwc/pwc-if.c This patch converts a if () BUG(); construct to BUG_ON(); which occupies less space, uses unlikely and is safer when BUG() is disabled. Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 46c11483088..e8db6e58d39 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -1095,8 +1095,7 @@ static int pwc_video_open(struct inode *inode, struct file *file) PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev); pdev = (struct pwc_device *)vdev->priv; - if (pdev == NULL) - BUG(); + BUG_ON(!pdev); if (pdev->vopen) { PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n"); return -EBUSY;