summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYash Suthar <yashsuthar983@gmail.com>2026-04-19 00:41:24 +0530
committerLinus Walleij <linusw@kernel.org>2026-04-28 11:31:28 +0200
commit728bf8ecac7733848a214b95b1aba41e0ee3ffb9 (patch)
treefe9d3bbfa16dc34f4e48f4f1282c83d6ec5c6d0e /drivers
parent3c8e7ba0e3996723f7e4be7c982826a9c2be828b (diff)
downloadlinux-728bf8ecac7733848a214b95b1aba41e0ee3ffb9.tar.gz
linux-728bf8ecac7733848a214b95b1aba41e0ee3ffb9.zip
pinctrl: pinconf-generic: Use kmemdup_array() over kmemdup()
using kmemdup_array instead of kmemdup ,as it is more readable and matches the intent of the api. tested with w=1, no new warnings introduced. Signed-off-by: Yash Suthar <yashsuthar983@gmail.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/pinconf-generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 64ed28309788..d333ddd44298 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -419,7 +419,7 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
* Now limit the number of configs to the real number of
* found properties.
*/
- *configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);
+ *configs = kmemdup_array(cfg, ncfg, sizeof(unsigned long), GFP_KERNEL);
if (!*configs) {
ret = -ENOMEM;
goto out;