alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch] ALSA: mixart: silence unitialized variable warnings
@ 2016-03-15  7:09 Dan Carpenter
  2016-03-15  9:01 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-03-15  7:09 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, alsa-devel, kernel-janitors

We print can print the uninitialized memory on error.  Which is an info
leak, I suppose but it's basically harmless.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c
index 24a1955..58fd79eb 100644
--- a/sound/pci/mixart/mixart_mixer.c
+++ b/sound/pci/mixart/mixart_mixer.c
@@ -726,7 +726,7 @@ int mixart_update_playback_stream_level(struct snd_mixart* chip, int is_aes, int
 	int volume[2];
 	struct mixart_msg request;
 	struct mixart_set_out_stream_level_req set_level;
-	u32 status;
+	u32 status = 0;
 	struct mixart_pipe *pipe;
 
 	memset(&set_level, 0, sizeof(set_level));
@@ -778,7 +778,7 @@ int mixart_update_capture_stream_level(struct snd_mixart* chip, int is_aes)
 	struct mixart_pipe *pipe;
 	struct mixart_msg request;
 	struct mixart_set_in_audio_level_req set_level;
-	u32 status;
+	u32 status = 0;
 
 	if(is_aes) {
 		idx = 1;

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

* Re: [patch] ALSA: mixart: silence unitialized variable warnings
  2016-03-15  7:09 [patch] ALSA: mixart: silence unitialized variable warnings Dan Carpenter
@ 2016-03-15  9:01 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2016-03-15  9:01 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors

On Tue, 15 Mar 2016 08:09:17 +0100,
Dan Carpenter wrote:
> 
> We print can print the uninitialized memory on error.  Which is an info
> leak, I suppose but it's basically harmless.
> 
> 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 24a1955..58fd79eb 100644
> --- a/sound/pci/mixart/mixart_mixer.c
> +++ b/sound/pci/mixart/mixart_mixer.c
> @@ -726,7 +726,7 @@ int mixart_update_playback_stream_level(struct snd_mixart* chip, int is_aes, int
>  	int volume[2];
>  	struct mixart_msg request;
>  	struct mixart_set_out_stream_level_req set_level;
> -	u32 status;
> +	u32 status = 0;
>  	struct mixart_pipe *pipe;
>  
>  	memset(&set_level, 0, sizeof(set_level));
> @@ -778,7 +778,7 @@ int mixart_update_capture_stream_level(struct snd_mixart* chip, int is_aes)
>  	struct mixart_pipe *pipe;
>  	struct mixart_msg request;
>  	struct mixart_set_in_audio_level_req set_level;
> -	u32 status;
> +	u32 status = 0;
>  
>  	if(is_aes) {
>  		idx = 1;
> 

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

end of thread, other threads:[~2016-03-15  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15  7:09 [patch] ALSA: mixart: silence unitialized variable warnings Dan Carpenter
2016-03-15  9:01 ` Takashi Iwai

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).