All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürg Billeter" <j@bitron.ch>
To: Mark Brown <broonie@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Simon Horman" <horms@verge.net.au>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	"Jürg Billeter" <j@bitron.ch>
Subject: [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
Date: Wed,  2 Jul 2014 13:18:51 +0200	[thread overview]
Message-ID: <1404299931-21384-1-git-send-email-j@bitron.ch> (raw)

The default index 1 was used as the loop was terminated before the
following code could be reached:

	if (mod[i] == this)
		index = i;

Signed-off-by: Jürg Billeter <j@bitron.ch>
---
 sound/soc/sh/rcar/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 4e86265..d737fea 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -295,9 +295,11 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
 	mod[0] = NULL; /* for "mem" */
 	index = 1;
 	for (i = 1; i < MOD_MAX; i++) {
-		if (!src) {
-			mod[i] = ssi;
+		if (!ssi) {
 			break;
+		} else if (!src) {
+			mod[i] = ssi;
+			ssi = NULL;
 		} else if (!dvc) {
 			mod[i] = src;
 			src = NULL;
-- 
2.0.1


             reply	other threads:[~2014-07-02 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 11:18 Jürg Billeter [this message]
2014-07-03 13:57 ` [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used Kuninori Morimoto
2014-07-03 14:05   ` Kuninori Morimoto
2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter
2014-07-04  8:08     ` Kuninori Morimoto

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=1404299931-21384-1-git-send-email-j@bitron.ch \
    --to=j@bitron.ch \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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.