mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
mfd: arizona: Clean up on failed runtime resume
Make sure that we don't leave the device enabled needlessly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
1816cb3409
commit
4816bd1c6d
@ -235,18 +235,21 @@ static int arizona_runtime_resume(struct device *dev)
|
||||
|
||||
ret = arizona_wait_for_boot(arizona);
|
||||
if (ret != 0) {
|
||||
regulator_disable(arizona->dcvdd);
|
||||
return ret;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = regcache_sync(arizona->regmap);
|
||||
if (ret != 0) {
|
||||
dev_err(arizona->dev, "Failed to restore register cache\n");
|
||||
regulator_disable(arizona->dcvdd);
|
||||
return ret;
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
regcache_cache_only(arizona->regmap, true);
|
||||
regulator_disable(arizona->dcvdd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int arizona_runtime_suspend(struct device *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user