summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r--drivers/base/regmap/regcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 409abd282c6c..afcfef838263 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -119,7 +119,7 @@ int regcache_init(struct regmap *map)
if (!tmp_buf)
return -ENOMEM;
map->reg_defaults = tmp_buf;
- } else {
+ } else if (map->num_reg_defaults_raw) {
/* Some devices such as PMICs don't have cache defaults,
* we cope with this by reading back the HW registers and
* crafting the cache defaults by hand.
OpenPOWER on IntegriCloud