projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bd83ed
)
regmap: cache: fix errno in regcache_hw_init()
author
Xiubo Li
<Li.Xiubo@freescale.com>
Thu, 9 Oct 2014 09:02:54 +0000
(17:02 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 20 Oct 2014 11:25:01 +0000
(12:25 +0100)
When kmalloc() fails, we should return -ENOMEM.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/regmap/regcache.c
b/drivers/base/regmap/regcache.c
index 7558e6b01c0495b217737a7a89ef652dd7c49740..6bec659e35d9578e3a7a1a05cfd645dafefafb7f 100644
(file)
--- 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 -E
INVAL
;
+ return -E
NOMEM
;
ret = regmap_raw_read(map, 0, tmp_buf,
map->num_reg_defaults_raw);
map->cache_bypass = cache_bypass;