From 0cc596d25594e062d441aa397acf6231ea49f00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= Date: Thu, 26 Jul 2012 07:59:04 -0300 Subject: [PATCH] --- yaml --- r: 320680 b: refs/heads/master c: 8f695d3f07bf9fd2914d18d1d2f89e3574b809ff h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/v4l2-dev.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 0a3c3926a460..7e534c709261 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cd779254f92f30cef8d43d0c4345cfeebfc94db8 +refs/heads/master: 8f695d3f07bf9fd2914d18d1d2f89e3574b809ff diff --git a/trunk/drivers/media/video/v4l2-dev.c b/trunk/drivers/media/video/v4l2-dev.c index 625248585c85..07aeafca9eaa 100644 --- a/trunk/drivers/media/video/v4l2-dev.c +++ b/trunk/drivers/media/video/v4l2-dev.c @@ -478,12 +478,12 @@ static int v4l2_open(struct inode *inode, struct file *filp) } err: - /* decrease the refcount in case of an error */ - if (ret) - video_put(vdev); if (vdev->debug) printk(KERN_DEBUG "%s: open (%d)\n", video_device_node_name(vdev), ret); + /* decrease the refcount in case of an error */ + if (ret) + video_put(vdev); return ret; } @@ -500,12 +500,12 @@ static int v4l2_release(struct inode *inode, struct file *filp) if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags)) mutex_unlock(vdev->lock); } - /* decrease the refcount unconditionally since the release() - return value is ignored. */ - video_put(vdev); if (vdev->debug) printk(KERN_DEBUG "%s: release\n", video_device_node_name(vdev)); + /* decrease the refcount unconditionally since the release() + return value is ignored. */ + video_put(vdev); return ret; }