From: Nicolin Chen Date: Tue, 31 May 2016 23:06:39 +0000 (-0700) Subject: ASoC: cs53l30: Check return value of regcache_sync() X-Git-Tag: v4.8-rc1~84^2~1^2~8^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=87a4bb11355f8b59c0d865a96044b5853f6c222e;p=karo-tx-linux.git 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 Acked-by: Paul Handrigan Signed-off-by: Mark Brown --- 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; }