aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-01 17:01:00 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-01 17:01:55 +0200
commitb5c21c84705dbd96a0fff930d33022a17910b4f4 (patch)
treea080aa4383c8f4ffb91225d234ac9b530b2ff0fa /sound/pci/hda/hda_codec.c
parentALSA: hda: Fix a headphone detection issue when using SOF (diff)
parentALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages (diff)
downloadlinux-dev-b5c21c84705dbd96a0fff930d33022a17910b4f4.tar.xz
linux-dev-b5c21c84705dbd96a0fff930d33022a17910b4f4.zip
Merge branch 'for-linus' into for-next
This back-merge is necessary for adjusting the latest FireWire fix with the recent refactoring in 5.3 development branch. 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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d0f1dbcfbda4..ccb53f1c1e1a 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -840,7 +840,14 @@ static int snd_hda_codec_dev_free(struct snd_device *device)
if (codec->core.type == HDA_DEV_LEGACY)
snd_hdac_device_unregister(&codec->core);
codec_display_power(codec, false);
- put_device(hda_codec_dev(codec));
+
+ /*
+ * In the case of ASoC HD-audio bus, the device refcount is released in
+ * snd_hdac_ext_bus_device_remove() explicitly.
+ */
+ if (codec->core.type == HDA_DEV_LEGACY)
+ put_device(hda_codec_dev(codec));
+
return 0;
}