V4L/DVB (8857): v4l2-dev: replace panic with BUG

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:08 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ea9a1...
Commit:     6ea9a1829a89515c1866151b1fdca7ee612d1490
Parent:     20c104d0a4d055cfa3df4fcbae818f8e10bd541a
Author:     Hans Verkuil <hverkuil@xs4all.nl>
AuthorDate: Sat Aug 30 09:40:47 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Sun Oct 12 09:36:56 2008 -0200

    V4L/DVB (8857): v4l2-dev: replace panic with BUG
    
    Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/video/v4l2-dev.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 02b9cc7..7addf2f 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -91,8 +91,11 @@ static void v4l2_chardev_release(struct kobject *kobj)
 	struct video_device *vfd = container_of(kobj, struct video_device, cdev.kobj);
 
 	mutex_lock(&videodev_lock);
-	if (video_device[vfd->minor] != vfd)
-		panic("videodev: bad release");
+	if (video_device[vfd->minor] != vfd) {
+		mutex_unlock(&videodev_lock);
+		BUG();
+		return;
+	}
 
 	/* Free up this device for reuse */
 	video_device[vfd->minor] = NULL;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (8857): v4l2-dev: replace panic with BUG, Linux Kernel Mailing ..., (Mon Oct 13, 3:08 pm)