]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: cs53l30: Check return value of regcache_sync()
authorNicolin Chen <nicoleotsuka@gmail.com>
Tue, 31 May 2016 23:06:39 +0000 (16:06 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 2 Jun 2016 10:16:09 +0000 (11:16 +0100)
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>
sound/soc/codecs/cs53l30.c

index 9aff449e57af4a3f9005bf5d16ebb30f484738e7..ac90dd79857eb2dcbe544ccb96785c924af479ab 100644 (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;
 }