Skip to content

Commit 2c89db8

Browse files
committed
regmap: Handle sparse caches in the default sync
If there is no cache entry available we will get -ENOENT from the cache implementation, handle this gracefully and skip rather than treating it as an error. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230325-regcache-sparse-sync-v1-1-2a890239d061@kernel.org
1 parent dc4c623 commit 2c89db8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/base/regmap/regcache.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
311311
continue;
312312

313313
ret = regcache_read(map, reg, &val);
314+
if (ret == -ENOENT)
315+
continue;
314316
if (ret)
315317
return ret;
316318

0 commit comments

Comments
 (0)