ALSA: hda: cs35l41: Don't return -EINVAL from system suspend/resume
authorTakashi Iwai <tiwai@suse.de>
Thu, 5 Jan 2023 09:35:30 +0000 (10:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 09:33:45 +0000 (10:33 +0100)
commit8107550bfe1189d7459292a66aab30a74c349cda
tree852633579f70235ecda5faf167053aceba0183f2
parent57f6bea5218c37426ccf68b37fa66a0f476ef869
ALSA: hda: cs35l41: Don't return -EINVAL from system suspend/resume

commit 15a59cb0a3d6ddf2cb79f8dc3081b3130aad3767 upstream.

The recent commit to support the system suspend for CS35L41 caused a
regression on the models with CS35L41_EXT_BOOST_NO_VSPK_SWITC boost
type, as the suspend/resume callbacks just return -EINVAL.  This is
eventually handled as a fatal error and blocks the whole system
suspend/resume.

For avoiding the problem, this patch corrects the return code from
cs35l41_system_suspend() and _resume() to 0, and replace dev_err()
with dev_err_once() for stop spamming too much.

Fixes: 88672826e2a4 ("ALSA: hda: cs35l41: Support System Suspend")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/all/e6751ac2-34f3-d13f-13db-8174fade8308@pm.me
Link: https://lore.kernel.org/r/20230105093531.16960-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/cs35l41_hda.c