Skip to contentSkip to conversation

ALSA: mixart: silence unitialized variable warnings

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: mixart: silence unitialized variable warnings

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

sound/pci/mixart/mixart_mixer.c +2 -2
index 24a1955..58fd79eb 100644
@@ -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;
Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

Applied, thanks.

Takashi

Quoted 24 lines
sound/pci/mixart/mixart_mixer.c +2 -2
index 24a1955..58fd79eb 100644
@@ -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;