Commit be69eae9 authored by Erick Archer's avatar Erick Archer Committed by Mark Brown

ASoC: ti: j721e-evm: Use devm_kcalloc() instead of devm_kzalloc()

Use 2-factor multiplication argument form devm_kcalloc() instead
of devm_kzalloc().

Link: https://github.com/KSPP/linux/issues/162Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: default avatarErick Archer <erick.archer@gmx.com>
Link: https://msgid.link/r/20240109181101.3806-1-erick.archer@gmx.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9423d7b9
......@@ -649,7 +649,7 @@ static int j721e_soc_probe_cpb(struct j721e_priv *priv, int *link_idx,
* Link 2: McASP10 <- pcm3168a_1 ADC
*/
comp_count = 6;
compnent = devm_kzalloc(priv->dev, comp_count * sizeof(*compnent),
compnent = devm_kcalloc(priv->dev, comp_count, sizeof(*compnent),
GFP_KERNEL);
if (!compnent) {
ret = -ENOMEM;
......@@ -763,7 +763,7 @@ static int j721e_soc_probe_ivi(struct j721e_priv *priv, int *link_idx,
* \ pcm3168a_b ADC
*/
comp_count = 8;
compnent = devm_kzalloc(priv->dev, comp_count * sizeof(*compnent),
compnent = devm_kcalloc(priv->dev, comp_count, sizeof(*compnent),
GFP_KERNEL);
if (!compnent) {
ret = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment