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>
This commit is contained in:
Nicolin Chen 2016-05-31 16:06:39 -07:00 committed by Mark Brown
parent b97c444681
commit 87a4bb1135
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}