diff options
author | Luca Risolia <luca.risolia@studio.unibo.it> | 2006-11-21 06:13:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-26 05:52:37 -0500 |
commit | 5718bbd2d92b9c2aa2f5700e4d3ed9d72f72f47e (patch) | |
tree | 1f887f31677c5bd370b60d343fad9b246324ba01 /drivers/media | |
parent | a5bbc7d94cf1dcb2100eeaf68791a401ad7ce54d (diff) |
V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera
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 'drivers/media')
-rw-r--r-- | drivers/media/video/et61x251/et61x251_core.c | 3 | ||||
-rw-r--r-- | 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 f786ab11d2cd..86e353b26b53 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(struct et61x251_device* cam) | |||
1182 | video_set_drvdata(cam->v4ldev, NULL); | 1182 | video_set_drvdata(cam->v4ldev, NULL); |
1183 | video_unregister_device(cam->v4ldev); | 1183 | video_unregister_device(cam->v4ldev); |
1184 | 1184 | ||
1185 | usb_put_dev(cam->usbdev); | ||
1186 | |||
1187 | mutex_unlock(&et61x251_sysfs_lock); | 1185 | mutex_unlock(&et61x251_sysfs_lock); |
1188 | 1186 | ||
1189 | kfree(cam->control_buffer); | 1187 | kfree(cam->control_buffer); |
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp) | |||
1275 | 1273 | ||
1276 | if (cam->state & DEV_DISCONNECTED) { | 1274 | if (cam->state & DEV_DISCONNECTED) { |
1277 | et61x251_release_resources(cam); | 1275 | et61x251_release_resources(cam); |
1276 | usb_put_dev(cam->usbdev); | ||
1278 | mutex_unlock(&cam->dev_mutex); | 1277 | mutex_unlock(&cam->dev_mutex); |
1279 | kfree(cam); | 1278 | kfree(cam); |
1280 | return 0; | 1279 | return 0; |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index a4702d3c2aca..42fb60d985b9 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(struct sn9c102_device* cam) | |||
1462 | video_set_drvdata(cam->v4ldev, NULL); | 1462 | video_set_drvdata(cam->v4ldev, NULL); |
1463 | video_unregister_device(cam->v4ldev); | 1463 | video_unregister_device(cam->v4ldev); |
1464 | 1464 | ||
1465 | usb_put_dev(cam->usbdev); | ||
1466 | |||
1467 | mutex_unlock(&sn9c102_sysfs_lock); | 1465 | mutex_unlock(&sn9c102_sysfs_lock); |
1468 | 1466 | ||
1469 | kfree(cam->control_buffer); | 1467 | kfree(cam->control_buffer); |
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp) | |||
1555 | 1553 | ||
1556 | if (cam->state & DEV_DISCONNECTED) { | 1554 | if (cam->state & DEV_DISCONNECTED) { |
1557 | sn9c102_release_resources(cam); | 1555 | sn9c102_release_resources(cam); |
1556 | usb_put_dev(cam->usbdev); | ||
1558 | mutex_unlock(&cam->dev_mutex); | 1557 | mutex_unlock(&cam->dev_mutex); |
1559 | kfree(cam); | 1558 | kfree(cam); |
1560 | return 0; | 1559 | return 0; |