diff options
author | lixiubo <lixiubo@cmss.chinamobile.com> | 2015-11-20 11:06:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-20 13:27:59 +0100 |
commit | 549e08a0a93442ab62e0aee8aeb8ae6a7f2b5273 (patch) | |
tree | 9bf090c5b8126d10c939fbc3ed8070858d22c951 /drivers/base/regmap/regcache-rbtree.c | |
parent | regmap: replace kzalloc with kcalloc (diff) | |
download | linux-549e08a0a93442ab62e0aee8aeb8ae6a7f2b5273.tar.xz linux-549e08a0a93442ab62e0aee8aeb8ae6a7f2b5273.zip |
regmap: replace kmalloc with kmalloc_array
Replace kmalloc with specialized function kmalloc_array when the size
is a multiplication of : number * size
Signed-off-by: lixiubo <lixiubo@cmss.chinamobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regcache-rbtree.c')
-rw-r--r-- | drivers/base/regmap/regcache-rbtree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 3b6cfede2fd9..9d7ced559cba 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -361,8 +361,8 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg) rbnode->base_reg = reg; } - rbnode->block = kmalloc(rbnode->blklen * map->cache_word_size, - GFP_KERNEL); + rbnode->block = kmalloc_array(rbnode->blklen, map->cache_word_size, + GFP_KERNEL); if (!rbnode->block) goto err_free; |