Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d9a276a3eb073251737cb92b790bfdb9f0b9139
Commit:     5d9a276a3eb073251737cb92b790bfdb9f0b9139
Parent:     0779bf2d2ecc4d9b1e9437ae659f50e6776a7666
Author:     Eric Sesterhenn <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 30 05:26:46 2006 +0100
Committer:  Adrian Bunk <[EMAIL PROTECTED]>
CommitDate: Thu Nov 30 05:26:46 2006 +0100

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
---
 drivers/media/video/pwc/pwc-if.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 46c1148..e8db6e5 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 *
        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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to