diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-09 13:23:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-10 10:24:03 +0100 |
commit | 6e6ace00a045251bd172b9b9c2379857bbff3dc7 (patch) | |
tree | 63a4d6686b3955ca16e7727883445209de67074b /drivers/base/regmap/regcache.c | |
parent | f094fea68f0575286c55c06141cc89ffd0049024 (diff) |
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>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index c5379c86de88..409abd282c6c 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -378,7 +378,7 @@ int regcache_lookup_reg(struct regmap *map, unsigned int reg) if (r) return r - map->reg_defaults; else - return -1; + return -ENOENT; } int regcache_insert_reg(struct regmap *map, unsigned int reg, |