diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2016-05-31 16:06:39 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-06-02 11:16:09 +0100 |
commit | 87a4bb11355f8b59c0d865a96044b5853f6c222e (patch) | |
tree | cadb3a4cb943d3e8f821183c9b31dc06aebe57cf /sound/soc/codecs/cs53l30.c | |
parent | b97c4446817a88a3e5c85d6eed3e65693588c088 (diff) | |
download | lwn-87a4bb11355f8b59c0d865a96044b5853f6c222e.tar.gz lwn-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.c | 6 |
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; } |