All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [morimoto-linux:fw-cleanup-2020-11-19-v2 64/65] sound/soc/generic/simple-card-utils.c:214 asoc_simple_startup() error: uninitialized symbol 'ret'.
Date: Mon, 30 Nov 2020 15:30:29 +0300	[thread overview]
Message-ID: <20201130123029.GC2767@kadam> (raw)

[-- Attachment #1: Type: text/plain, Size: 3579 bytes --]

tree:   https://github.com/morimoto/linux fw-cleanup-2020-11-19-v2
head:   162c7cf8b0061392ee4d764c9b714933a739cc6b
commit: e2f5d86c276eb2ea8395c461f7fa3b1369608868 [64/65] ASoC: simple-card-utils: prepare multi DAI - setup1
config: i386-randconfig-m021-20201119 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
sound/soc/generic/simple-card-utils.c:214 asoc_simple_startup() error: uninitialized symbol 'ret'.

vim +/ret +214 sound/soc/generic/simple-card-utils.c

f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  194  int asoc_simple_startup(struct snd_pcm_substream *substream)
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  195  {
9ae035e289379ba Kuninori Morimoto 2020-07-20  196  	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  197  	struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  198  	struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  199  	struct asoc_simple_dai *dai;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  200  	int i1, i2, i;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  201  	int ret;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  202  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  203  	for_each_prop_dai_cpu(props, i1, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  204  		ret = asoc_simple_clk_enable(dai);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  205  		if (ret)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  206  			goto cpu_err;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  207  	}
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  208  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  209  	for_each_prop_dai_codec(props, i2, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  210  		ret = asoc_simple_clk_enable(dai);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  211  		if (ret)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  212  			goto codec_err;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  213  	}
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19 @214  	return ret;

It's probably unlikely that we wouldn't enter both loops, but it would
be nicer to just "return 0;"

f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  215  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  216  codec_err:
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  217  	for_each_prop_dai_codec(props, i, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  218  		if (i >= i2)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  219  			break;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  220  		asoc_simple_clk_disable(dai);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  221  	}
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  222  cpu_err:
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  223  	for_each_prop_dai_cpu(props, i, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  224  		if (i >= i1)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  225  			break;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  226  		asoc_simple_clk_disable(dai);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  227  	}
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  228  	return ret;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  229  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31986 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [morimoto-linux:fw-cleanup-2020-11-19-v2 64/65] sound/soc/generic/simple-card-utils.c:214 asoc_simple_startup() error: uninitialized symbol 'ret'.
Date: Mon, 30 Nov 2020 15:30:29 +0300	[thread overview]
Message-ID: <20201130123029.GC2767@kadam> (raw)

[-- Attachment #1: Type: text/plain, Size: 3579 bytes --]

tree:   https://github.com/morimoto/linux fw-cleanup-2020-11-19-v2
head:   162c7cf8b0061392ee4d764c9b714933a739cc6b
commit: e2f5d86c276eb2ea8395c461f7fa3b1369608868 [64/65] ASoC: simple-card-utils: prepare multi DAI - setup1
config: i386-randconfig-m021-20201119 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
sound/soc/generic/simple-card-utils.c:214 asoc_simple_startup() error: uninitialized symbol 'ret'.

vim +/ret +214 sound/soc/generic/simple-card-utils.c

f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  194  int asoc_simple_startup(struct snd_pcm_substream *substream)
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  195  {
9ae035e289379ba Kuninori Morimoto 2020-07-20  196  	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  197  	struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  198  	struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  199  	struct asoc_simple_dai *dai;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  200  	int i1, i2, i;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  201  	int ret;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  202  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  203  	for_each_prop_dai_cpu(props, i1, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  204  		ret = asoc_simple_clk_enable(dai);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  205  		if (ret)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  206  			goto cpu_err;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  207  	}
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  208  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  209  	for_each_prop_dai_codec(props, i2, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  210  		ret = asoc_simple_clk_enable(dai);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  211  		if (ret)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  212  			goto codec_err;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  213  	}
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19 @214  	return ret;

It's probably unlikely that we wouldn't enter both loops, but it would
be nicer to just "return 0;"

f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  215  
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  216  codec_err:
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  217  	for_each_prop_dai_codec(props, i, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  218  		if (i >= i2)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  219  			break;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  220  		asoc_simple_clk_disable(dai);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  221  	}
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  222  cpu_err:
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  223  	for_each_prop_dai_cpu(props, i, dai) {
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  224  		if (i >= i1)
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  225  			break;
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  226  		asoc_simple_clk_disable(dai);
e2f5d86c276eb2e Kuninori Morimoto 2020-11-19  227  	}
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  228  	return ret;
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  229  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31986 bytes --]

             reply	other threads:[~2020-11-30 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 12:30 Dan Carpenter [this message]
2020-11-30 12:30 ` [morimoto-linux:fw-cleanup-2020-11-19-v2 64/65] sound/soc/generic/simple-card-utils.c:214 asoc_simple_startup() error: uninitialized symbol 'ret' Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2020-11-19 22:30 kernel test robot

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=20201130123029.GC2767@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild@lists.01.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.