aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorGravatar Christophe JAILLET <christophe.jaillet@wanadoo.fr> 2022-05-21 08:59:35 +0200
committerGravatar Mark Brown <broonie@kernel.org> 2022-06-06 12:41:28 +0100
commit1f19a2d1d6b9a5796182874eecdd5a67dd94b90c (patch)
tree60249409754b000544d819aaa8c5bb525092a37f /drivers/spi
parentspi: spi-zynqmp-gqspi: Add two chip select support (diff)
downloadlinux-1f19a2d1d6b9a5796182874eecdd5a67dd94b90c.tar.gz
linux-1f19a2d1d6b9a5796182874eecdd5a67dd94b90c.tar.bz2
linux-1f19a2d1d6b9a5796182874eecdd5a67dd94b90c.zip
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-intel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-intel.c b/drivers/spi/spi-intel.c
index 50f42983b950..66063687ae27 100644
--- a/drivers/spi/spi-intel.c
+++ b/drivers/spi/spi-intel.c
@@ -1236,8 +1236,8 @@ static int intel_spi_populate_chip(struct intel_spi *ispi)
return -ENOMEM;
pdata->nr_parts = 1;
- pdata->parts = devm_kcalloc(ispi->dev, sizeof(*pdata->parts),
- pdata->nr_parts, GFP_KERNEL);
+ pdata->parts = devm_kcalloc(ispi->dev, pdata->nr_parts,
+ sizeof(*pdata->parts), GFP_KERNEL);
if (!pdata->parts)
return -ENOMEM;