ALSA: hda: Add missing sanity checks in PM prepare/complete callbacks
authorTakashi Iwai <tiwai@suse.de>
Mon, 29 Mar 2021 11:30:59 +0000 (13:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 13:00:09 +0000 (15:00 +0200)
commit6d91f3afb632f9ebba134ec8934a47804b6b0267
treeb70cd31cbb1901fac165039a9b4544877c715229
parentb3116cda4e523031eee24e9ea727308ee2dbbdb2
ALSA: hda: Add missing sanity checks in PM prepare/complete callbacks

commit 66affb7bb0dc0905155a1b2475261aa704d1ddb5 upstream.

The recently added PM prepare and complete callbacks don't have the
sanity check whether the card instance has been properly initialized,
which may potentially lead to Oops.

This patch adds the azx_is_pm_ready() call in each place
appropriately like other PM callbacks.

Fixes: f5dac54d9d93 ("ALSA: hda: Separate runtime and system suspend")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210329113059.25035-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_intel.c