diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-10 19:29:55 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-10 11:46:14 +0000 |
commit | 2a14d7d9b7439fe62082a60a7f8983ccb463d134 (patch) | |
tree | 5a49db57fb6856e92f824870efb8e258e70729e6 | |
parent | 8a892d6996b60c822f19ad1844eb15b96ce393c7 (diff) | |
download | op-kernel-dev-2a14d7d9b7439fe62082a60a7f8983ccb463d134.zip op-kernel-dev-2a14d7d9b7439fe62082a60a7f8983ccb463d134.tar.gz |
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>
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 28e89fd7..46b2bd7 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -709,7 +709,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)); |