[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250221165333.2780888-3-raag.jadav@intel.com>
Date: Fri, 21 Feb 2025 22:23:22 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: perex@...ex.cz,
tiwai@...e.com,
broonie@...nel.org,
lgirdwood@...il.com,
deller@....de,
andriy.shevchenko@...ux.intel.com,
sre@...nel.org,
sakari.ailus@...ux.intel.com,
mchehab@...nel.org,
hverkuil-cisco@...all.nl,
jdmason@...zu.us,
fancer.lancer@...il.com
Cc: linux-sound@...r.kernel.org,
linux-fbdev@...r.kernel.org,
linux-pm@...r.kernel.org,
linux-media@...r.kernel.org,
ntb@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v1 02/13] ASoC: hdac_hdmi: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() and while at it, make the size robust
against type changes.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
sound/soc/codecs/hdac_hdmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index e1a7f0b0c0f3..3bea5d09219a 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1017,8 +1017,7 @@ static int hdac_hdmi_create_pin_port_muxs(struct hdac_device *hdev,
return -ENOMEM;
}
- se->texts = devm_kmemdup(&hdev->dev, items,
- (num_items * sizeof(char *)), GFP_KERNEL);
+ se->texts = devm_kmemdup_array(&hdev->dev, items, num_items, sizeof(items[0]), GFP_KERNEL);
if (!se->texts)
return -ENOMEM;
--
2.34.1
Powered by blists - more mailing lists