diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-10-09 17:02:56 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 12:25:02 +0100 |
commit | 06f9c24e55075e50ebc8b249a7853ad31bc1b3d1 (patch) | |
tree | 947591f7e9f8e26cf73b234f23bfa96ad3cab736 /drivers/base/regmap | |
parent | fbba43c527d851088a891ed83346d5cc9f095b64 (diff) | |
download | blackbird-op-linux-06f9c24e55075e50ebc8b249a7853ad31bc1b3d1.tar.gz blackbird-op-linux-06f9c24e55075e50ebc8b249a7853ad31bc1b3d1.zip |
regmap: cache: use kmalloc_array instead of kmalloc
This patch fixes checkpatch.pl warning for regmap cache.
WARNING : prefer kmalloc_array over kmalloc with multiply
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 0852c890b4b5..726d956f6a29 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -61,8 +61,8 @@ static int regcache_hw_init(struct regmap *map) if (!regmap_volatile(map, i * map->reg_stride)) count++; - map->reg_defaults = kmalloc(count * sizeof(struct reg_default), - GFP_KERNEL); + map->reg_defaults = kmalloc_array(count, sizeof(struct reg_default), + GFP_KERNEL); if (!map->reg_defaults) { ret = -ENOMEM; goto err_free; |