Skip to content

Commit

Permalink
regmap: Handle sparse caches in the default sync
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mark Brown committed Mar 27, 2023
1 parent dc4c623 commit 2c89db8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
continue;

ret = regcache_read(map, reg, &val);
if (ret == -ENOENT)
continue;
if (ret)
return ret;

Expand Down

0 comments on commit 2c89db8

Please sign in to comment.