diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-09-14 17:24:57 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-09-14 17:26:10 +0200 |
commit | d3f9990f1b48514b33342612b51fad238592d774 (patch) | |
tree | 9ad5ae81ba3e820e91a09e2675b7c98675bd809e /sound/pci/hda/hda_codec.c | |
parent | ALSA: firewire-tascam: check intermediate state of clock status and retry (diff) | |
parent | Merge tag 'asoc-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next (diff) | |
download | linux-dev-d3f9990f1b48514b33342612b51fad238592d774.tar.xz linux-dev-d3f9990f1b48514b33342612b51fad238592d774.zip |
Merge branch 'for-next' into for-linus
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 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 51f10ed9bc43..a2fb19129219 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -846,7 +846,13 @@ static void snd_hda_codec_dev_release(struct device *dev) snd_hda_sysfs_clear(codec); kfree(codec->modelname); kfree(codec->wcaps); - kfree(codec); + + /* + * In the case of ASoC HD-audio, hda_codec is device managed. + * It will be freed when the ASoC device is removed. + */ + if (codec->core.type == HDA_DEV_LEGACY) + kfree(codec); } #define DEV_NAME_LEN 31 |