linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'
@ 2021-11-15 12:01 Simon Trimmer
  2021-11-15 12:42 ` Charles Keepax
  2021-11-15 23:34 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Trimmer @ 2021-11-15 12:01 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, patches, linux-kernel, Simon Trimmer,
	kernel test robot, Dan Carpenter

This patch fixes the static analysis warning as it is correctly
indicating a possible code path, it cannot know that for the affected
firmware versions subname would always be NULL.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index d4f0d72cbcc8..6cb01a8e08fb 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -617,8 +617,9 @@ static int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl)
 	switch (cs_dsp->fw_ver) {
 	case 0:
 	case 1:
-		snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, "%s %s %x",
-			 cs_dsp->name, region_name, cs_ctl->alg_region.alg);
+		ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
+				"%s %s %x", cs_dsp->name, region_name,
+				cs_ctl->alg_region.alg);
 		break;
 	case 2:
 		ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
-- 
2.33.0


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

* Re: [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'
  2021-11-15 12:01 [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret' Simon Trimmer
@ 2021-11-15 12:42 ` Charles Keepax
  2021-11-15 23:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2021-11-15 12:42 UTC (permalink / raw)
  To: Simon Trimmer
  Cc: broonie, alsa-devel, patches, linux-kernel, kernel test robot,
	Dan Carpenter

On Mon, Nov 15, 2021 at 12:01:54PM +0000, Simon Trimmer wrote:
> This patch fixes the static analysis warning as it is correctly
> indicating a possible code path, it cannot know that for the affected
> firmware versions subname would always be NULL.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

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

* Re: [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'
  2021-11-15 12:01 [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret' Simon Trimmer
  2021-11-15 12:42 ` Charles Keepax
@ 2021-11-15 23:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-11-15 23:34 UTC (permalink / raw)
  To: Simon Trimmer
  Cc: linux-kernel, alsa-devel, patches, Dan Carpenter, kernel test robot

On Mon, 15 Nov 2021 12:01:54 +0000, Simon Trimmer wrote:
> This patch fixes the static analysis warning as it is correctly
> indicating a possible code path, it cannot know that for the affected
> firmware versions subname would always be NULL.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus

Thanks!

[1/1] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'
      commit: a6e849d0007b374fc7fbb18d55941c77aa7c3923

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2021-11-16  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 12:01 [PATCH] ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret' Simon Trimmer
2021-11-15 12:42 ` Charles Keepax
2021-11-15 23:34 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).