From: Hans Verkuil <hans.verk...@cisco.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit e2c84ccb0fbe5e524d15bb09c042a6ca634adaed upstream.

If remove_pending is non-zero, then the v4l2_lock is never unlocked.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
Cc: Oliver Neukum <oneu...@suse.com>
Signed-off-by: Jiri Slaby <jsl...@suse.cz>
---
 drivers/media/usb/usbvision/usbvision-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index 661f7f2a9e8b..ea5ec8ed67a7 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -435,6 +435,7 @@ static int usbvision_v4l2_close(struct file *file)
        usbvision_scratch_free(usbvision);
 
        usbvision->user--;
+       mutex_unlock(&usbvision->v4l2_lock);
 
        if (power_on_at_open) {
                /* power off in a little while
@@ -448,7 +449,6 @@ static int usbvision_v4l2_close(struct file *file)
                usbvision_release(usbvision);
                return 0;
        }
-       mutex_unlock(&usbvision->v4l2_lock);
 
        PDEBUG(DBG_IO, "success");
        return 0;
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to