diff options
Diffstat (limited to 'drivers')
-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) | |||
91 | struct video_device *vfd = container_of(kobj, struct video_device, cdev.kobj); | 91 | struct video_device *vfd = container_of(kobj, struct video_device, cdev.kobj); |
92 | 92 | ||
93 | mutex_lock(&videodev_lock); | 93 | mutex_lock(&videodev_lock); |
94 | if (video_device[vfd->minor] != vfd) | 94 | if (video_device[vfd->minor] != vfd) { |
95 | panic("videodev: bad release"); | 95 | mutex_unlock(&videodev_lock); |
96 | BUG(); | ||
97 | return; | ||
98 | } | ||
96 | 99 | ||
97 | /* Free up this device for reuse */ | 100 | /* Free up this device for reuse */ |
98 | video_device[vfd->minor] = NULL; | 101 | video_device[vfd->minor] = NULL; |