提交 2eaf3960 编写于 作者: D Devin Heitmueller 提交者: Mauro Carvalho Chehab

V4L/DVB (11079): au0828: fix panic on disconnect if analog initialization failed

If the analog initialization failed to create the video device, we never
actually add the entry to the au0828_devlist.  Therefore a panic occurs when
unregistering the analog subsystem.

Make it so we only remove the entry from the list if we added it to the list
in the first place.
Signed-off-by: NDevin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 220be77c
......@@ -700,9 +700,10 @@ void au0828_analog_unregister(struct au0828_dev *dev)
dprintk(1, "au0828_release_resources called\n");
mutex_lock(&au0828_sysfs_lock);
list_del(&dev->au0828list);
if (dev->vdev)
if (dev->vdev) {
list_del(&dev->au0828list);
video_unregister_device(dev->vdev);
}
if (dev->vbi_dev)
video_unregister_device(dev->vbi_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册