public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
@ 2014-07-02 11:18 Jürg Billeter
       [not found] ` <CA+t-KAiFNi2cdfKQfNYf7svWKXg4sBhPzib+Q7qfONosuwdy7A@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Jürg Billeter @ 2014-07-02 11:18 UTC (permalink / raw)
  To: Mark Brown, Kuninori Morimoto
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Simon Horman,
	Magnus Damm, alsa-devel, linux-kernel, Jürg Billeter

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-03 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02 11:18 [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used Jürg Billeter
     [not found] ` <CA+t-KAiFNi2cdfKQfNYf7svWKXg4sBhPzib+Q7qfONosuwdy7A@mail.gmail.com>
2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox