Skip to content

Commit

Permalink
V4L/DVB (8857): v4l2-dev: replace panic with BUG
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 20c104d commit 6ea9a18
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6ea9a18

Please sign in to comment.