Skip to content

Commit

Permalink
mfd: arizona: Check errors from regcache_sync()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jan 22, 2013
1 parent 1f0529b commit 9270bdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/mfd/arizona-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9270bdf

Please sign in to comment.