Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9270bdf5 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 1f0529b4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
}