All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [alsa-devel] [PATCH 13/14] ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition
Date: 22 Nov 2019 14:42:22 +0900	[thread overview]
Message-ID: <878so88o1t.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87r2208o9g.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current soc_set_name_prefix() for loop is checking both codec_conf
pointer and its number

	for (...; i < card->num_configs && card->codec_conf; ...)

But, if card->num_configs exists but card->codec_conf was NULL,
it is just bug.
This patch cleanups for loop condition.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 843bfe1..af33fbc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1211,7 +1211,7 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
 {
 	int i;
 
-	for (i = 0; i < card->num_configs && card->codec_conf; i++) {
+	for (i = 0; i < card->num_configs; i++) {
 		struct snd_soc_codec_conf *map = &card->codec_conf[i];
 		struct device_node *of_node = soc_component_to_node(component);
 
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-11-22  5:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  5:37 [alsa-devel] [PATCH 00/14] ASoC: soc-core cleanup step6 Kuninori Morimoto
2019-11-22  5:38 ` [alsa-devel] [PATCH 01/14] ASoC: soc-core: remove dai_link_list Kuninori Morimoto
2019-11-22  5:38 ` [alsa-devel] [PATCH 02/14] ASoC: soc-core: remove snd_soc_disconnect_sync() Kuninori Morimoto
2019-11-22  5:38 ` [alsa-devel] [PATCH 03/14] ASoC: soc-core: remove snd_soc_get_dai_substream() Kuninori Morimoto
2019-11-22  5:39 ` [alsa-devel] [PATCH 04/14] ASoC: soc-core: move snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-22 16:22   ` Pierre-Louis Bossart
2019-11-22 16:45   ` Pierre-Louis Bossart
2019-11-22  5:39 ` [alsa-devel] [PATCH 05/14] ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-22  5:39 ` [alsa-devel] [PATCH 06/14] ASoC: soc-core: move snd_soc_find_dai_link() Kuninori Morimoto
2019-11-22  5:40 ` [alsa-devel] [PATCH 07/14] ASoC: soc-core: rename snd_soc_add_dai_link() to snd_soc_add_pcm_runtime() Kuninori Morimoto
2019-11-22 16:43   ` Pierre-Louis Bossart
2019-11-22  5:41 ` [alsa-devel] [PATCH 08/14] ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 09/14] ASoC: soc-core: move soc_link_dai_pcm_new() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 10/14] ASoC: soc-core: rename soc_link_dai_pcm_new() to soc_dai_pcm_new() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 11/14] ASoC: soc-core: move soc_link_init() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 12/14] ASoC: soc-core: rename soc_link_init() to soc_init_pcm_runtime() Kuninori Morimoto
2019-11-22 16:41   ` Pierre-Louis Bossart
2019-11-22  5:42 ` Kuninori Morimoto [this message]
2019-11-22  5:42 ` [alsa-devel] [PATCH 14/14] ASoC: soc-core: soc_set_name_prefix(): get component device_node at out of loop Kuninori Morimoto
2019-11-22 16:49 ` [alsa-devel] [PATCH 00/14] ASoC: soc-core cleanup step6 Pierre-Louis Bossart
2019-11-25  0:01   ` Kuninori Morimoto
2019-11-22 20:34 ` Sridharan, Ranjani
2019-11-25  0:01   ` 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=878so88o1t.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@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.