diff options
author | 2025-02-28 11:58:10 +0530 | |
---|---|---|
committer | 2025-02-28 14:01:00 +0000 | |
commit | d9d71a6e2d19a2f3ccebea0092b8ddc1e935886f (patch) | |
tree | f78eb21d39214b6e117e6745dda077c291b32a8f | |
parent | ASoC: tlv320dac33: use devm_kmemdup_array() (diff) | |
download | wireguard-linux-d9d71a6e2d19a2f3ccebea0092b8ddc1e935886f.tar.xz wireguard-linux-d9d71a6e2d19a2f3ccebea0092b8ddc1e935886f.zip |
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@intel.com>
Link: https://patch.msgid.link/20250228062812.150004-5-raag.jadav@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 6 |
1 files 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; |