ALSA: emux: fix /proc teardown at module unload
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Sat, 6 Apr 2024 06:48:14 +0000 (08:48 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 7 Apr 2024 06:35:44 +0000 (08:35 +0200)
We forgot to remember the wavetable /proc entry, so we'd fail to free it
at module unload.

This matters only when only the synth module is unloaded, as unloading
the card driver would tear down the sub-entry anyway.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Message-ID: <20240406064830.1029573-2-oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/synth/emux/emux_proc.c

index 7993e6a01e548f636b7854784781bc49eb82f72b..820351f52551ec7772fcb1b400b92a2f91bda5cc 100644 (file)
@@ -102,6 +102,7 @@ void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
        entry->content = SNDRV_INFO_CONTENT_TEXT;
        entry->private_data = emu;
        entry->c.text.read = snd_emux_proc_info_read;
+       emu->proc = entry;
 }
 
 void snd_emux_proc_free(struct snd_emux *emu)