diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-04 17:16:12 +0000 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-22 03:12:44 +0100 |
commit | 9270bdf5405668ca5d75ace1d7872e2762162c47 (patch) | |
tree | 464604170247f7c12c9cb77b584ebdee3e29f004 /drivers/mfd | |
parent | 1f0529b4d80ad02df637be67ed4f82e93b8db32f (diff) | |
download | op-kernel-dev-9270bdf5405668ca5d75ace1d7872e2762162c47.zip op-kernel-dev-9270bdf5405668ca5d75ace1d7872e2762162c47.tar.gz |
mfd: arizona: Check errors from regcache_sync()
If the control bus is unrelabile we may hit errors during regcache_sync(),
especially given that it tends to be one the most dense bursts of I/O in
many systems.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/arizona-core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index bc8a3ed..222c03a 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -239,7 +239,12 @@ static int arizona_runtime_resume(struct device *dev) return ret; } - regcache_sync(arizona->regmap); + ret = regcache_sync(arizona->regmap); + if (ret != 0) { + dev_err(arizona->dev, "Failed to restore register cache\n"); + regulator_disable(arizona->dcvdd); + return ret; + } return 0; } |