Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285360
b: refs/heads/master
c: 1fc2b5f
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Dec 11, 2011
1 parent 2a40933 commit 0b5182b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 885f3cad982eabbc85c2ab052bc44453e4aca6d3
refs/heads/master: 1fc2b5f7fb6d98c079236d57203c7b73a13c54d7
10 changes: 4 additions & 6 deletions trunk/drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,9 @@ static void v4l2_device_release(struct device *cd)
struct v4l2_device *v4l2_dev = vdev->v4l2_dev;

mutex_lock(&videodev_lock);
if (video_device[vdev->minor] != vdev) {
mutex_unlock(&videodev_lock);
if (WARN_ON(video_device[vdev->minor] != vdev)) {
/* should not happen */
WARN_ON(1);
mutex_unlock(&videodev_lock);
return;
}

Expand All @@ -168,7 +167,7 @@ static void v4l2_device_release(struct device *cd)
mutex_unlock(&videodev_lock);

#if defined(CONFIG_MEDIA_CONTROLLER)
if (vdev->v4l2_dev && vdev->v4l2_dev->mdev &&
if (v4l2_dev && v4l2_dev->mdev &&
vdev->vfl_type != VFL_TYPE_SUBDEV)
media_device_unregister_entity(&vdev->entity);
#endif
Expand Down Expand Up @@ -556,8 +555,7 @@ int __video_register_device(struct video_device *vdev, int type, int nr,
vdev->minor = -1;

/* the release callback MUST be present */
WARN_ON(!vdev->release);
if (!vdev->release)
if (WARN_ON(!vdev->release))
return -EINVAL;

/* v4l2_fh support */
Expand Down

0 comments on commit 0b5182b

Please sign in to comment.