From: Pierre-Louis Bossart Date: Fri, 21 Aug 2020 19:55:54 +0000 (-0500) Subject: ASoC: codecs: max98373-sdw: add missing test on resume X-Git-Tag: v5.10-rc1~122^2~1^2^2~147^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65fae64d79d2cbad43819c1ab83390594fac7fcb;p=thirdparty%2Fkernel%2Flinux.git ASoC: codecs: max98373-sdw: add missing test on resume All existing SoundWire codecs follow the same pattern on resume, except for this codec which doesn't test if the hardware is initialized. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 5fe724728e84e..6469612c42cb8 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -256,6 +256,9 @@ static __maybe_unused int max98373_resume(struct device *dev) struct max98373_priv *max98373 = dev_get_drvdata(dev); unsigned long time; + if (!max98373->hw_init) + return 0; + if (!slave->unattach_request) goto regmap_sync;