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/video/sn9c102 | |
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/video/sn9c102')
-rw-r--r-- | drivers/media/video/sn9c102/sn9c102_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; |