All of lore.kernel.org
 help / color / mirror / Atom feed
* [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'.
@ 2020-11-30 12:30 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-11-30 12:30 UTC (permalink / raw)
  To: kbuild

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [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'.
@ 2020-11-19 22:30 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-11-19 22:30 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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
:::::: branch date: 16 hours ago
:::::: commit date: 17 hours ago
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

bb6fc620c2ed972 Kuninori Morimoto 2016-08-08  193  
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;
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  }
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  230  EXPORT_SYMBOL_GPL(asoc_simple_startup);
f38df5bf0c9cb90 Kuninori Morimoto 2019-03-20  231  

---
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 --]

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

end of thread, other threads:[~2020-11-30 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-11-30 12:30 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2020-11-19 22:30 kernel test robot

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.