From d3994baf2ed28dc7f864f229e703f8ac395bc772 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 21 Nov 2006 09:13:59 -0200 Subject: Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera From: Luca Risolia The patch fix bug 5748. Signed-off-by: Luca Risolia Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/et61x251/et61x251_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'linux/drivers/media/video/et61x251') 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; -- cgit v1.2.3