[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250221165333.2780888-4-raag.jadav@intel.com>
Date: Fri, 21 Feb 2025 22:23:23 +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 03/13] ASoC: tlv320dac33: 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/tlv320dac33.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index fa46f51d4341..423b9264a205 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1477,10 +1477,8 @@ static int dac33_i2c_probe(struct i2c_client *client)
if (dac33 == NULL)
return -ENOMEM;
- dac33->reg_cache = devm_kmemdup(&client->dev,
- dac33_reg,
- ARRAY_SIZE(dac33_reg) * sizeof(u8),
- GFP_KERNEL);
+ dac33->reg_cache = devm_kmemdup_array(&client->dev, dac33_reg, ARRAY_SIZE(dac33_reg),
+ sizeof(dac33_reg[0]), GFP_KERNEL);
if (!dac33->reg_cache)
return -ENOMEM;
--
2.34.1
Powered by blists - more mailing lists