diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-30 14:40:47 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 13:36:56 +0200 |
commit | 6ea9a1829a89515c1866151b1fdca7ee612d1490 (patch) | |
tree | bc5db23095917268dbd732b0c47dda73f7affb53 /drivers/media/video/v4l2-dev.c | |
parent | V4L/DVB (8856): v4l: fix assorted compile warnings/errors (diff) | |
download | linux-6ea9a1829a89515c1866151b1fdca7ee612d1490.tar.xz linux-6ea9a1829a89515c1866151b1fdca7ee612d1490.zip |
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>
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r-- | 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 02b9cc76d36b..7addf2fd55de 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; |