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

Commit 5d9a276a authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk
Browse files

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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 0779bf2d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;