diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 7558e6b01c0495b217737a7a89ef652dd7c49740..6bec659e35d9578e3a7a1a05cfd645dafefafb7f 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -44,7 +44,7 @@ static int regcache_hw_init(struct regmap *map) map->cache_bypass = 1; tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL); if (!tmp_buf) - return -EINVAL; + return -ENOMEM; ret = regmap_raw_read(map, 0, tmp_buf, map->num_reg_defaults_raw); map->cache_bypass = cache_bypass;