All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org,
	vkoul@kernel.org, gregkh@linuxfoundation.org,
	liam.r.girdwood@linux.intel.com, jank@cadence.com,
	joe@perches.com, srinivas.kandagatla@linaro.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>
Subject: [PATCH v3 1/5] soundwire: intel: fix inversion in devm_kcalloc parameters
Date: Wed, 10 Apr 2019 22:16:57 -0500	[thread overview]
Message-ID: <20190411031701.5926-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20190411031701.5926-1-pierre-louis.bossart@linux.intel.com>

the number of elements and size are inverted, fix.

This probably only worked because the number of properties is
hard-coded to 1.

Fixes: 71bb8a1b059e ('soundwire: intel: Add Intel Master driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 drivers/soundwire/intel.c | 4 ++--
 1 file 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;
 
-- 
2.17.1


  reply	other threads:[~2019-04-11  3:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11  3:16 [PATCH v3 0/5] soundwire: code cleanup Pierre-Louis Bossart
2019-04-11  3:16 ` Pierre-Louis Bossart [this message]
2019-04-11  8:43   ` [PATCH v3 1/5] soundwire: intel: fix inversion in devm_kcalloc parameters Takashi Iwai
2019-04-11  3:16 ` [PATCH v3 2/5] soundwire: fix style issues Pierre-Louis Bossart
2019-04-14  9:58   ` Vinod Koul
2019-04-15 13:09     ` [alsa-devel] " Pierre-Louis Bossart
2019-04-17  9:33       ` Johan Hovold
2019-04-17 17:18         ` Pierre-Louis Bossart
2019-04-18 17:29           ` Johan Hovold
2019-04-19 17:14       ` Pierre-Louis Bossart
2019-04-19 17:14         ` Pierre-Louis Bossart
2019-04-30  8:57         ` [alsa-devel] " Vinod Koul
2019-04-30  8:51       ` Vinod Koul
2019-04-30 13:38         ` Pierre-Louis Bossart
2019-04-30 14:05           ` Greg KH
2019-04-30 14:13             ` Pierre-Louis Bossart
2019-04-30 14:25               ` Greg KH
2019-04-30 14:54           ` Vfi
2019-04-30 16:29             ` Pierre-Louis Bossart
2019-04-11  3:16 ` [PATCH v3 3/5] soundwire: bus: remove useless initializations Pierre-Louis Bossart
2019-04-11  3:17 ` [PATCH v3 4/5] soundwire: stream: remove useless initialization of local variable Pierre-Louis Bossart
2019-04-11  3:17 ` [PATCH v3 5/5] soundwire: add missing newlines in dynamic debug logs Pierre-Louis Bossart
2019-04-11  8:43 ` [PATCH v3 0/5] soundwire: code cleanup Takashi Iwai
2019-04-14 10:04 ` Vinod Koul
2019-04-15 12:57   ` [alsa-devel] " Pierre-Louis Bossart
2019-04-19 17:07     ` Pierre-Louis Bossart
2019-04-19 17:07       ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190411031701.5926-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jank@cadence.com \
    --cc=joe@perches.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.