summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regcache-flat.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-flat.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-flat.c')
-rw-r--r--drivers/base/regmap/regcache-flat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c
index 0246f44ded74..686c9e0b930e 100644
--- a/drivers/base/regmap/regcache-flat.c
+++ b/drivers/base/regmap/regcache-flat.c
@@ -21,7 +21,7 @@ static int regcache_flat_init(struct regmap *map)
int i;
unsigned int *cache;
- map->cache = kzalloc(sizeof(unsigned int) * (map->max_register + 1),
+ map->cache = kcalloc(map->max_register + 1, sizeof(unsigned int),
GFP_KERNEL);
if (!map->cache)
return -ENOMEM;