Message ID | 20220201112144.29411-1-peter.ujfalusi@linux.intel.com |
---|---|
State | Accepted |
Commit | 1c7f0e349aa5f8f80b1cac3d4917405332e14cdf |
Headers | show |
Series | ALSA: hda: Skip codec shutdown in case the codec is not registered | expand |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7016b48227bf..f552785d301e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3000,6 +3000,10 @@ void snd_hda_codec_shutdown(struct hda_codec *codec) { struct hda_pcm *cpcm; + /* Skip the shutdown if codec is not registered */ + if (!codec->registered) + return; + list_for_each_entry(cpcm, &codec->pcm_list_head, list) snd_pcm_suspend_all(cpcm->pcm);