Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/d114558dd0351b863ced8cc01b31754a5a4b960d.1653116362.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Christophe JAILLET and committed by
Mark Brown
1f19a2d1 dd9c232d

+2 -2
+2 -2
drivers/spi/spi-intel.c
··· 1236 1236 return -ENOMEM; 1237 1237 1238 1238 pdata->nr_parts = 1; 1239 - pdata->parts = devm_kcalloc(ispi->dev, sizeof(*pdata->parts), 1240 - pdata->nr_parts, GFP_KERNEL); 1239 + pdata->parts = devm_kcalloc(ispi->dev, pdata->nr_parts, 1240 + sizeof(*pdata->parts), GFP_KERNEL); 1241 1241 if (!pdata->parts) 1242 1242 return -ENOMEM; 1243 1243