public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: mixart: don't print an unintialized variable on error
Date: Wed, 13 Jul 2016 10:24:42 +0000	[thread overview]
Message-ID: <s5hmvll96ol.wl-tiwai@suse.de> (raw)
In-Reply-To: <20160713095953.GA29468@mwanda>

On Wed, 13 Jul 2016 11:59:53 +0200,
Dan Carpenter wrote:
> 
> My static checker complains that "resp" could be unitialized on error
> when we print its value.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.


Takashi

> 
> diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c
> index 58fd79eb..51e5349 100644
> --- a/sound/pci/mixart/mixart_mixer.c
> +++ b/sound/pci/mixart/mixart_mixer.c
> @@ -965,7 +965,7 @@ static int mixart_update_monitoring(struct snd_mixart* chip, int channel)
>  	int err;
>  	struct mixart_msg request;
>  	struct mixart_set_out_audio_level audio_level;
> -	u32 resp;
> +	u32 resp = 0;
>  
>  	if(chip->pipe_out_ana.status = PIPE_UNDEFINED)
>  		return -EINVAL; /* no pipe defined */
> 

      parent reply	other threads:[~2016-07-13 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13  9:59 [patch] ALSA: mixart: don't print an unintialized variable on error Dan Carpenter
2016-07-13 10:18 ` Takashi Sakamoto
2016-07-13 14:28   ` Takashi Sakamoto
2016-07-13 10:24 ` Takashi Iwai [this message]

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=s5hmvll96ol.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=perex@perex.cz \
    /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