diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-21 09:08:06 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-21 09:08:06 +0100 |
commit | b94d3539de59ec6481e38f83c455324fd3aeabc1 (patch) | |
tree | cc6034e70d130f02d0e87bcedb9fc4ccf71b66ce /sound/pci/hda/hda_codec.c | |
parent | 0623536ca3e8fd7cb8b7468b0fd4d61d80f0b6ea (diff) | |
download | blackbird-obmc-linux-b94d3539de59ec6481e38f83c455324fd3aeabc1.tar.gz blackbird-obmc-linux-b94d3539de59ec6481e38f83c455324fd3aeabc1.zip |
ALSA: hda - Fix double free of jack instances
The jack instances created in patch_sigmatel.c may be double-freed.
The device management code checks the invalid element, and thus there
is no real breakage, but it spews annoying warning messages.
But, we can't simply remove the release calls of these jack instances
because they have to be freed when the codec is re-configured.
Now, a new flag, bus->shutdown is introduced to indicate that the bus
is really being unloaded, i.e. the objects managed by the device
manager will be automatically deleted. We release these objects only
when this flag isn't set.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 5d5e8012d6a5..a98ce5b11188 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -464,6 +464,7 @@ static int snd_hda_bus_free(struct hda_bus *bus) static int snd_hda_bus_dev_free(struct snd_device *device) { struct hda_bus *bus = device->device_data; + bus->shutdown = 1; return snd_hda_bus_free(bus); } |