diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-11 02:01:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:27 -0400 |
commit | 2eaf396020555973cad7aa5b517c2418eccbca50 (patch) | |
tree | 60d99f425958a6822eef9e743010cdfd79424f7d /drivers/media | |
parent | 220be77c6e4302207c34afc78a98b4994f92f6e5 (diff) |
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: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/au0828/au0828-video.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 4c77aebfe6ee..6abdd8bf4494 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -700,9 +700,10 @@ void au0828_analog_unregister(struct au0828_dev *dev) | |||
700 | dprintk(1, "au0828_release_resources called\n"); | 700 | dprintk(1, "au0828_release_resources called\n"); |
701 | mutex_lock(&au0828_sysfs_lock); | 701 | mutex_lock(&au0828_sysfs_lock); |
702 | 702 | ||
703 | list_del(&dev->au0828list); | 703 | if (dev->vdev) { |
704 | if (dev->vdev) | 704 | list_del(&dev->au0828list); |
705 | video_unregister_device(dev->vdev); | 705 | video_unregister_device(dev->vdev); |
706 | } | ||
706 | if (dev->vbi_dev) | 707 | if (dev->vbi_dev) |
707 | video_unregister_device(dev->vbi_dev); | 708 | video_unregister_device(dev->vbi_dev); |
708 | 709 | ||