summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regcache-lzo.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-01-05 19:07:16 +0000
committerMark Brown <broonie@kernel.org>2016-01-05 19:07:16 +0000
commit8798975bb645c0a0927b6f5f4a5964607ef932c1 (patch)
treedc323f62c7078685f691bccaea3575235e5a3713 /drivers/base/regmap/regcache-lzo.c
parent6cca67129d526505567696813e2625b1caaa7abd (diff)
parentfcac0233d89ddce72945f3e0afaf4680572d8525 (diff)
Merge remote-tracking branch 'regmap/topic/core' into regmap-next
Diffstat (limited to 'drivers/base/regmap/regcache-lzo.c')
-rw-r--r--drivers/base/regmap/regcache-lzo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index 736e0d378567..6f77d7319fc6 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;
@@ -152,8 +152,8 @@ static int regcache_lzo_init(struct regmap *map)
* that register.
*/
bmp_size = map->num_reg_defaults_raw;
- sync_bmp = kmalloc(BITS_TO_LONGS(bmp_size) * sizeof(long),
- GFP_KERNEL);
+ sync_bmp = kmalloc_array(BITS_TO_LONGS(bmp_size), sizeof(long),
+ GFP_KERNEL);
if (!sync_bmp) {
ret = -ENOMEM;
goto err;