commit 5718bbd2d92b9c2aa2f5700e4d3ed9d72f72f47e
tree 1f887f31677c5bd370b60d343fad9b246324ba01
parent a5bbc7d94cf1dcb2100eeaf68791a401ad7ce54d
author Luca Risolia <[EMAIL PROTECTED]> 1164107639 -0300
committer Mauro Carvalho Chehab <[EMAIL PROTECTED]> 1164538357 -0200

V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera

The patch fix bug 5748.

Signed-off-by: Luca Risolia <[EMAIL PROTECTED]>
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>

 drivers/media/video/et61x251/et61x251_core.c |    3 +--
 drivers/media/video/sn9c102/sn9c102_core.c   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/et61x251/et61x251_core.c 
b/drivers/media/video/et61x251/et61x251_core.c
index f786ab1..86e353b 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(s
        video_set_drvdata(cam->v4ldev, NULL);
        video_unregister_device(cam->v4ldev);
 
-       usb_put_dev(cam->usbdev);
-
        mutex_unlock(&et61x251_sysfs_lock);
 
        kfree(cam->control_buffer);
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode
 
        if (cam->state & DEV_DISCONNECTED) {
                et61x251_release_resources(cam);
+               usb_put_dev(cam->usbdev);
                mutex_unlock(&cam->dev_mutex);
                kfree(cam);
                return 0;
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c 
b/drivers/media/video/sn9c102/sn9c102_core.c
index a4702d3..42fb60d 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(st
        video_set_drvdata(cam->v4ldev, NULL);
        video_unregister_device(cam->v4ldev);
 
-       usb_put_dev(cam->usbdev);
-
        mutex_unlock(&sn9c102_sysfs_lock);
 
        kfree(cam->control_buffer);
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode*
 
        if (cam->state & DEV_DISCONNECTED) {
                sn9c102_release_resources(cam);
+               usb_put_dev(cam->usbdev);
                mutex_unlock(&cam->dev_mutex);
                kfree(cam);
                return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to