summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-11-21 09:13:59 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-11-21 09:13:59 -0200
commitd3994baf2ed28dc7f864f229e703f8ac395bc772 (patch)
tree9843cfaa671911d37971a3abfb555f0378fc8580 /linux
parent7e385b9df5fa0f2d85b30da7e758739a06563650 (diff)
downloadmediapointer-dvb-s2-d3994baf2ed28dc7f864f229e703f8ac395bc772.tar.gz
mediapointer-dvb-s2-d3994baf2ed28dc7f864f229e703f8ac395bc772.tar.bz2
Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera
From: Luca Risolia <luca.risolia@studio.unibo.it> The patch fix bug 5748. Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/et61x251/et61x251_core.c3
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102_core.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/linux/drivers/media/video/et61x251/et61x251_core.c b/linux/drivers/media/video/et61x251/et61x251_core.c
index d8961d82c..17577a9cc 100644
--- a/linux/drivers/media/video/et61x251/et61x251_core.c
+++ b/linux/drivers/media/video/et61x251/et61x251_core.c
@@ -1186,8 +1186,6 @@ static void et61x251_release_resources(struct et61x251_device* cam)
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);
@@ -1279,6 +1277,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)
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/linux/drivers/media/video/sn9c102/sn9c102_core.c b/linux/drivers/media/video/sn9c102/sn9c102_core.c
index d9c512fef..793a249b8 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1466,8 +1466,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam)
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);
@@ -1559,6 +1557,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
if (cam->state & DEV_DISCONNECTED) {
sn9c102_release_resources(cam);
+ usb_put_dev(cam->usbdev);
mutex_unlock(&cam->dev_mutex);
kfree(cam);
return 0;