summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_hdmi.c
diff options
context:
space:
mode:
authorTakashi Iwai2015-04-22 18:26:38 +0200
committerTakashi Iwai2015-04-24 17:27:57 +0200
commitc560a6797e3bec1e04f1f6f9f3c2135db0f5c8ee (patch)
tree433dd8c4dd8c53ef7ebe4411f6dbdae7b1e9b74d /sound/pci/hda/patch_hdmi.c
parentALSA: core: Fix possible memory leaks at error path in info.c (diff)
downloadkernel-qcow2-linux-c560a6797e3bec1e04f1f6f9f3c2135db0f5c8ee.tar.gz
kernel-qcow2-linux-c560a6797e3bec1e04f1f6f9f3c2135db0f5c8ee.tar.xz
kernel-qcow2-linux-c560a6797e3bec1e04f1f6f9f3c2135db0f5c8ee.zip
ALSA: core: Remove child proc file elements recursively
This patch changes the way to manage the resource release of proc files: namely, let snd_info_free_entry() freeing the whole children. This makes it us possible to drop the snd_device_*() management. Then snd_card_proc_new() becomes merely a wrapper to snd_info_create_card_entry(). Together with this change, now you need to call snd_info_free_entry() for a proc entry created via snd_card_proc_new(), while it was freed via snd_device_free() beforehand. Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r--sound/pci/hda/patch_hdmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 5f44f60a6389..6e7e0b85c3e3 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -592,7 +592,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
{
if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) {
- snd_device_free(per_pin->codec->card, per_pin->proc_entry);
+ snd_info_free_entry(per_pin->proc_entry);
per_pin->proc_entry = NULL;
}
}