mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 08:06:41 +07:00
regmap: cache: fix errno in regcache_hw_init()
When kmalloc() fails, we should return -ENOMEM. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5bd83ed098
commit
ba3f1c85a6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user