From: Hans Verkuil Date: Sat, 30 Aug 2008 12:40:47 +0000 (-0300) Subject: V4L/DVB (8857): v4l2-dev: replace panic with BUG X-Git-Tag: v2.6.28-rc1~601^2~224 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6ea9a1829a89515c1866151b1fdca7ee612d1490;p=linux-2.6-omap-h63xx.git V4L/DVB (8857): v4l2-dev: replace panic with BUG Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 02b9cc76d36..7addf2fd55d 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;