regmap: Return a sensible error code if we fail to read the cache
If a register isn't cached then let callers know that so they can fall back or error handle appropriately. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
This commit is contained in:
@@ -193,8 +193,7 @@ static int regcache_rbtree_read(struct regmap *map,
|
||||
*value = regcache_rbtree_get_register(rbnode, reg_tmp,
|
||||
map->cache_word_size);
|
||||
} else {
|
||||
/* uninitialized registers default to 0 */
|
||||
*value = 0;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user