(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

regmap: use krealloc_array() in regmap_register_patch()

Replace krealloc() with krealloc_array() in regmap_register_patch() to gain the built-in overflow check on the element-count * element-size multiplication, and switch to the early-return error style to reduce nesting. Assisted-by: LLM Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-4-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>


Author Peng Fan Committer Mark Brown Date Commit Parent 4e1b5ccf
+6 -9
1 changed file
+6 -9
1 changed file