Message ID | 20210310112809.9215-3-tiwai@suse.de |
---|---|
State | Accepted |
Commit | 5ff9dde42e8c72ed8102eb8cb62e03f9dc2103ab |
Headers | show |
Series | ALSA: hda: Fix potential bad accesses at suspend/resume | expand |
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index 6a8564566375..17a25e453f60 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -47,6 +47,10 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev) if (codec->bus->shutdown) return; + /* ignore unsol events during system suspend/resume */ + if (codec->core.dev.power.power_state.event != PM_EVENT_ON) + return; + if (codec->patch_ops.unsol_event) codec->patch_ops.unsol_event(codec, ev); }