summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-04-10 22:16:57 -0500
committerVinod Koul <vkoul@kernel.org>2019-04-14 15:33:26 +0530
commit4ac5627acc3e32c6a2acf5d570efc998792f2a65 (patch)
treeaa6c4326371c8294778f3ffb0d9ba5b234cac40f /drivers/soundwire
parentbfeffd155283772bbe78c6a05dec7c0128ee500c (diff)
downloadlinux-4ac5627acc3e32c6a2acf5d570efc998792f2a65.tar.bz2
soundwire: intel: fix inversion in devm_kcalloc parameters
the number of elements and size are inverted, fix. This probably only worked because the number of properties is hard-coded to 1. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index fd8d034cfec1..8669b314c476 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -796,8 +796,8 @@ static int intel_prop_read(struct sdw_bus *bus)
/* BIOS is not giving some values correctly. So, lets override them */
bus->prop.num_freq = 1;
- bus->prop.freq = devm_kcalloc(bus->dev, sizeof(*bus->prop.freq),
- bus->prop.num_freq, GFP_KERNEL);
+ bus->prop.freq = devm_kcalloc(bus->dev, bus->prop.num_freq,
+ sizeof(*bus->prop.freq), GFP_KERNEL);
if (!bus->prop.freq)
return -ENOMEM;