[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250228062812.150004-5-raag.jadav@intel.com>
Date: Fri, 28 Feb 2025 11:58:10 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: perex@...ex.cz,
tiwai@...e.com,
broonie@...nel.org,
lgirdwood@...il.com,
andriy.shevchenko@...ux.intel.com,
cezary.rojewski@...el.com,
amadeuszx.slawinski@...ux.intel.com,
shenghao-ding@...com,
kevin-lu@...com,
baojun.xu@...com,
jbrunet@...libre.com,
neil.armstrong@...aro.org,
khilman@...libre.com,
hayashi.kunihiko@...ionext.com,
mhiramat@...nel.org
Cc: linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v2 4/6] ASoC: uda1380: 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/uda1380.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 4f8fdd574585..c179d865b938 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -766,10 +766,8 @@ static int uda1380_i2c_probe(struct i2c_client *i2c)
return ret;
}
- uda1380->reg_cache = devm_kmemdup(&i2c->dev,
- uda1380_reg,
- ARRAY_SIZE(uda1380_reg) * sizeof(u16),
- GFP_KERNEL);
+ uda1380->reg_cache = devm_kmemdup_array(&i2c->dev, uda1380_reg, ARRAY_SIZE(uda1380_reg),
+ sizeof(uda1380_reg[0]), GFP_KERNEL);
if (!uda1380->reg_cache)
return -ENOMEM;
--
2.34.1
Powered by blists - more mailing lists