From eeda1bd69d5d8a020ce191f717b94ca99707daad Mon Sep 17 00:00:00 2001 From: lixiubo Date: Fri, 20 Nov 2015 18:06:29 +0800 Subject: regmap: replace kzalloc with kcalloc Replace kzalloc with specialized function kcalloc when the size is a multiplication of : number * sizeof Signed-off-by: lixiubo Signed-off-by: Mark Brown --- drivers/base/regmap/regcache-flat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/regmap/regcache-flat.c') 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; -- cgit v1.2.3