diff options
author | lixiubo <lixiubo@cmss.chinamobile.com> | 2015-11-20 18:06:29 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-20 12:27:57 +0000 |
commit | eeda1bd69d5d8a020ce191f717b94ca99707daad (patch) | |
tree | eb769d18e526981fcd22ac8c834b401e0eb4c376 /drivers/base/regmap/regcache-lzo.c | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) |
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-lzo.c')
-rw-r--r-- | drivers/base/regmap/regcache-lzo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c index 736e0d378567..52f69381c070 100644 --- a/drivers/base/regmap/regcache-lzo.c +++ b/drivers/base/regmap/regcache-lzo.c @@ -139,7 +139,7 @@ static int regcache_lzo_init(struct regmap *map) ret = 0; blkcount = regcache_lzo_block_count(map); - map->cache = kzalloc(blkcount * sizeof *lzo_blocks, + map->cache = kcalloc(blkcount, sizeof(*lzo_blocks), GFP_KERNEL); if (!map->cache) return -ENOMEM; |