提交 5718bbd2 编写于 作者: L Luca Risolia 提交者: Mauro Carvalho Chehab

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

The patch fix bug 5748.
Signed-off-by: NLuca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 a5bbc7d9
...@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam) ...@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam)
video_set_drvdata(cam->v4ldev, NULL); video_set_drvdata(cam->v4ldev, NULL);
video_unregister_device(cam->v4ldev); video_unregister_device(cam->v4ldev);
usb_put_dev(cam->usbdev);
mutex_unlock(&et61x251_sysfs_lock); mutex_unlock(&et61x251_sysfs_lock);
kfree(cam->control_buffer); kfree(cam->control_buffer);
...@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp) ...@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)
if (cam->state & DEV_DISCONNECTED) { if (cam->state & DEV_DISCONNECTED) {
et61x251_release_resources(cam); et61x251_release_resources(cam);
usb_put_dev(cam->usbdev);
mutex_unlock(&cam->dev_mutex); mutex_unlock(&cam->dev_mutex);
kfree(cam); kfree(cam);
return 0; return 0;
......
...@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam) ...@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam)
video_set_drvdata(cam->v4ldev, NULL); video_set_drvdata(cam->v4ldev, NULL);
video_unregister_device(cam->v4ldev); video_unregister_device(cam->v4ldev);
usb_put_dev(cam->usbdev);
mutex_unlock(&sn9c102_sysfs_lock); mutex_unlock(&sn9c102_sysfs_lock);
kfree(cam->control_buffer); kfree(cam->control_buffer);
...@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp) ...@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
if (cam->state & DEV_DISCONNECTED) { if (cam->state & DEV_DISCONNECTED) {
sn9c102_release_resources(cam); sn9c102_release_resources(cam);
usb_put_dev(cam->usbdev);
mutex_unlock(&cam->dev_mutex); mutex_unlock(&cam->dev_mutex);
kfree(cam); kfree(cam);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册