aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 3cf4785c3afe..b96cf7202860 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -434,15 +434,15 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
434{ 434{
435 int ret; 435 int ret;
436 436
437 if (!map->format.parse_val)
438 return -EINVAL;
439
440 if (!map->cache_bypass) { 437 if (!map->cache_bypass) {
441 ret = regcache_read(map, reg, val); 438 ret = regcache_read(map, reg, val);
442 if (ret == 0) 439 if (ret == 0)
443 return 0; 440 return 0;
444 } 441 }
445 442
443 if (!map->format.parse_val)
444 return -EINVAL;
445
446 if (map->cache_only) 446 if (map->cache_only)
447 return -EBUSY; 447 return -EBUSY;
448 448