pinctrl: freescale: imx-scmi: Use kmemdup_array instead of kmemdup for multiple alloc...
authorShen Lichuan <shenlichuan@vivo.com>
Fri, 23 Aug 2024 10:54:21 +0000 (18:54 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 26 Aug 2024 08:47:42 +0000 (10:47 +0200)
commite880754467ddd859e71fac64fc748e1bf4913232
tree8d09e6b27a6207a7dcbb2f82767462165c7d5a6b
parentd0627b201ae4980d8c1c9319b79ca016c5ef154e
pinctrl: freescale: imx-scmi: Use kmemdup_array instead of kmemdup for multiple allocation

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

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/20240823105421.50017-1-shenlichuan@vivo.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx-scmi.c