Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a14d7d9 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regmap: Fix kcalloc parameters swapped



The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8a892d69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));