提交 2a14d7d9 编写于 作者: A Axel Lin 提交者: Mark Brown

regmap: Fix kcalloc parameters swapped

The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 8a892d69
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册