aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2020-08-21 14:55:54 -0500
committerMark Brown <[email protected]>2020-08-24 13:41:30 +0100
commit65fae64d79d2cbad43819c1ab83390594fac7fcb (patch)
tree64490fb1b9c89e866dd75d2547b2244677589619
parente300486ad94d2608ebc3aaed4e03e86eeeb97084 (diff)
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/max98373-sdw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c
index 5fe724728e84..6469612c42cb 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;