Skip to contentSkip to conversation

ASoC: core: Initialize err for snd_soc_put_volsw_sx

PATCH Superseded Brian Austin 2 participants 4 messages Apr 3, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: core: Initialize err for snd_soc_put_volsw_sx

sound/soc/soc-core.c: In function ‘snd_soc_put_volsw_sx’:
sound/soc/soc-core.c:2600: warning: ‘err’ may be used uninitialized in this function

---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +1 -1
index 7b1a4fd..a6922bc 100644
@@ -2586,7 +2586,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
 	int max = mc->max;
 	int min = mc->min;
 	int mask = (1 << (fls(min + max) - 1)) - 1;
-	int err;
+	int err = 0;
 	unsigned short val, val_mask, val2 = 0;
 
 	val_mask = mask << shift;
Signature · 7 lines
1.7.9.1


_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#1 lore raw
Quoted 4 lines · Brian Austin

sound/soc/soc-core.c: In function ‘snd_soc_put_volsw_sx’:
sound/soc/soc-core.c:2600: warning: ‘err’ may be used uninitialized in this function

This should be Signed-off-by (change looks good).

#2 lore raw
Quoted 8 lines · Mark Brown
Quoted 4 lines · Brian Austin

sound/soc/soc-core.c: In function ‘snd_soc_put_volsw_sx’:
sound/soc/soc-core.c:2600: warning: ‘err’ may be used uninitialized in this function

This should be Signed-off-by (change looks good).

doh!

want me to resend?

#3 lore raw
Quoted 1 line · Brian Austin

want me to resend?

Please (it's easier to apply if I don't need to edit :) ).