projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69aaab0
)
ASoC: uda1380: use devm_kmemdup_array()
author
Raag Jadav
<raag.jadav@intel.com>
Fri, 28 Feb 2025 06:28:10 +0000
(11:58 +0530)
committer
Mark Brown
<broonie@kernel.org>
Fri, 28 Feb 2025 14:01:00 +0000
(14:01 +0000)
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>
sound/soc/codecs/uda1380.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/codecs/uda1380.c
b/sound/soc/codecs/uda1380.c
index 4f8fdd574585b4d7e5bd94a27defc8f5c5367d0b..c179d865b93836bf1217a830fb7289a8c7c8ecc0 100644
(file)
--- 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;