Skip to contentSkip to conversation

ALSA: mixart: silence an uninitialized variable warning

PATCH Applied Dan Carpenter 3 participants 3 messages Mar 16, 2016

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

PATCH 1/1 ALSA: mixart: silence an uninitialized variable warning

We could print the uninitialized value of "stat" in the error message.

sound/pci/mixart/mixart.c +1 -1
index bc81b9f..25c0ddd 100644
@@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
 	}
 
 	if(start) {
-		u32 stat;
+		u32 stat = 0;
 
 		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
 
#1 lore raw

Am 16.03.2016 08:42, schrieb Dan Carpenter:

Quoted 9 lines

We could print the uninitialized value of "stat" in the error message.

sound/pci/mixart/mixart.c +0 -0
index bc81b9f..25c0ddd 100644

sound/pci/mixart/mixart.c static int mixart_set_pipe_state(struct mixart_mgr *mgr, · line 138

Quoted 8 lines
sound/pci/mixart/mixart.c +1 -1
@@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
 	}
 
 	if(start) {
-		u32 stat;
+		u32 stat = 0;
 
 		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
 

@maintainer:
can someone please fix/remove the comment here ? it read like if (pipe_count==0) pipe_count = 0.

just my 2 cents,

re,
wh

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#2 lore raw
In reply to Dan Carpenter
Quoted 4 lines · Dan Carpenter

We could print the uninitialized value of "stat" in the error message.

Applied, thanks.

Takashi

Quoted 19 lines
sound/pci/mixart/mixart.c +1 -1
index bc81b9f..25c0ddd 100644
@@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
 	}
 
 	if(start) {
-		u32 stat;
+		u32 stat = 0;
 
 		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
 

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel