summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-02-10 19:29:55 +0800
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 08:00:37 -0800
commitab52922d17de2d10a8c38c20f83fceefbe7e6f97 (patch)
tree94fa8bebcc8481b64523ced09d44d84b533be9da /drivers/base
parent671b929941787fe45ad812aabacb283d186217dc (diff)
regmap: Fix kcalloc parameters swapped
The first parameter should be "number of elements" and the second parameter should be "element size". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 2a14d7d9b7439fe62082a60a7f8983ccb463d134) Change-Id: Ibe00000c7c6db1b36e5530e00713cdb434052f0a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87589
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index bed144c6bd3e..d08cff2bb7c1 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -819,7 +819,7 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
}
}
- map->patch = kcalloc(sizeof(struct reg_default), num_regs, GFP_KERNEL);
+ map->patch = kcalloc(num_regs, sizeof(struct reg_default), GFP_KERNEL);
if (map->patch != NULL) {
memcpy(map->patch, regs,
num_regs * sizeof(struct reg_default));