summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regcache-rbtree.c
diff options
context:
space:
mode:
authorlixiubo <lixiubo@cmss.chinamobile.com>2015-11-20 18:06:29 +0800
committerMark Brown <broonie@kernel.org>2015-11-20 12:27:57 +0000
commiteeda1bd69d5d8a020ce191f717b94ca99707daad (patch)
treeeb769d18e526981fcd22ac8c834b401e0eb4c376 /drivers/base/regmap/regcache-rbtree.c
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadlinux-eeda1bd69d5d8a020ce191f717b94ca99707daad.tar.bz2
regmap: replace kzalloc with kcalloc
Replace kzalloc with specialized function kcalloc when the size is a multiplication of : number * sizeof 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index 56486d92c4e7..3b6cfede2fd9 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -366,8 +366,9 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
if (!rbnode->block)
goto err_free;
- rbnode->cache_present = kzalloc(BITS_TO_LONGS(rbnode->blklen) *
- sizeof(*rbnode->cache_present), GFP_KERNEL);
+ rbnode->cache_present = kcalloc(BITS_TO_LONGS(rbnode->blklen),
+ sizeof(*rbnode->cache_present),
+ GFP_KERNEL);
if (!rbnode->cache_present)
goto err_free_block;