From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Date: Wed, 13 Jul 2016 10:24:42 +0000 Subject: Re: [patch] ALSA: mixart: don't print an unintialized variable on error Message-Id: List-Id: References: <20160713095953.GA29468@mwanda> In-Reply-To: <20160713095953.GA29468@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Jaroslav Kysela , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org 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 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 */ >