]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: samsung: Use kmemdup_array instead of kmemdup for multiple allocation
authorShen Lichuan <shenlichuan@vivo.com>
Fri, 23 Aug 2024 11:44:41 +0000 (19:44 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 23 Aug 2024 13:40:55 +0000 (15:40 +0200)
commit39dbbd4e6778ac5580313ba34409855250633c61
tree4788023d6a420b33d646f47e539b3b4bfc6673ff
parente61f1a729da850cca2c2d7e045b27c3fd4830d7c
pinctrl: samsung: Use kmemdup_array instead of kmemdup for multiple allocation

Let the kmemdup_array() take care about multiplication
and possible overflows.

Using kmemdup_array() is more appropriate and makes the code
easier to audit.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Link: https://lore.kernel.org/r/20240823114441.50648-1-shenlichuan@vivo.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/pinctrl/samsung/pinctrl-samsung.c