public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
Date: Mon, 11 Aug 2014 13:09:46 +0200	[thread overview]
Message-ID: <53E8A47A.4030808@metafoo.de> (raw)
In-Reply-To: <1407511775-26479-1-git-send-email-geert+renesas@glider.be>

On 08/08/2014 05:29 PM, Geert Uytterhoeven wrote:
> If soc_dapm_read() fails, reg_val will be uninitialized, and bogus
> values will be written later:
>
> sound/soc/soc-dapm.c: In function 'snd_soc_dapm_get_enum_double':
> sound/soc/soc-dapm.c:2862:15: warning: 'reg_val' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    unsigned int reg_val, val;
>                 ^
>
> Return early on error to fix this.
>
> Introduced by commit ce0fc93ae56e2ba50ff8c220d69e4e860e889320 ("ASoC:
> Add DAPM support at the component level").
> ---
> Is this correct? Please review.

Yes, thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>



  reply	other threads:[~2014-08-11 11:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 15:29 [PATCH] ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double() Geert Uytterhoeven
2014-08-11 11:09 ` Lars-Peter Clausen [this message]
2014-08-11 18:59 ` Mark Brown
2014-08-11 19:00 ` Mark Brown

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=53E8A47A.4030808@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox