summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs53l30.c
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2016-06-01 01:06:39 +0200
committerMark Brown <broonie@kernel.org>2016-06-02 12:16:09 +0200
commit87a4bb11355f8b59c0d865a96044b5853f6c222e (patch)
treecadb3a4cb943d3e8f821183c9b31dc06aebe57cf /sound/soc/codecs/cs53l30.c
parentASoC: cs53l30: Rename the volume controls for preamplifier (diff)
downloadlinux-87a4bb11355f8b59c0d865a96044b5853f6c222e.tar.xz
linux-87a4bb11355f8b59c0d865a96044b5853f6c222e.zip
ASoC: cs53l30: Check return value of regcache_sync()
Regcache_sync() might fail. So this patch adds a return value Check for it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs53l30.c')
-rw-r--r--sound/soc/codecs/cs53l30.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index 9aff449e57af..ac90dd79857e 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -1055,7 +1055,11 @@ static int cs53l30_runtime_resume(struct device *dev)
gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
regcache_cache_only(cs53l30->regmap, false);
- regcache_sync(cs53l30->regmap);
+ ret = regcache_sync(cs53l30->regmap);
+ if (ret) {
+ dev_err(dev, "failed to synchronize regcache: %d\n", ret);
+ return ret;
+ }
return 0;
}