Skip to content

Commit

Permalink
BUG_ON conversion for drivers/media/video/pwc/pwc-if.c
Browse files Browse the repository at this point in the history
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 <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Nov 30, 2006
1 parent 0779bf2 commit 5d9a276
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d9a276

Please sign in to comment.