clk: si521xx: restore cache_only on regcache_sync() failure in resume

If regcache_sync() fails in si521xx_resume(), the function only logs the
error, leaving regmap with cache_only disabled even though the register
cache has not been synchronized with the hardware.
Re-enable cache_only on failure to restore the state established by
si521xx_suspend().

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
bui duc phuc 2026-07-24 14:04:57 +07:00 committed by Brian Masney
parent f619355a6b
commit 906fddec02

View File

@ -365,8 +365,10 @@ static int si521xx_resume(struct device *dev)
regcache_cache_only(si->regmap, false);
ret = regcache_sync(si->regmap);
if (ret)
if (ret) {
regcache_cache_only(si->regmap, true);
dev_err(dev, "Failed to restore register map: %d\n", ret);
}
return ret;
}