You need to sign in or sign up before continuing.
未验证 提交 1f19a2d1 编写于 作者: C Christophe JAILLET 提交者: Mark Brown

spi: intel: Use correct order for the parameters of devm_kcalloc()

We should have 'n', then 'size', not the opposite.
This is harmless because the 2 values are just multiplied, but having
the correct order silence a (unpublished yet) smatch warning.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/d114558dd0351b863ced8cc01b31754a5a4b960d.1653116362.git.christophe.jaillet@wanadoo.frSigned-off-by: NMark Brown <broonie@kernel.org>
上级 dd9c232d
...@@ -1236,8 +1236,8 @@ static int intel_spi_populate_chip(struct intel_spi *ispi) ...@@ -1236,8 +1236,8 @@ static int intel_spi_populate_chip(struct intel_spi *ispi)
return -ENOMEM; return -ENOMEM;
pdata->nr_parts = 1; pdata->nr_parts = 1;
pdata->parts = devm_kcalloc(ispi->dev, sizeof(*pdata->parts), pdata->parts = devm_kcalloc(ispi->dev, pdata->nr_parts,
pdata->nr_parts, GFP_KERNEL); sizeof(*pdata->parts), GFP_KERNEL);
if (!pdata->parts) if (!pdata->parts)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册