[alsa-devel] [PATCH] ALSA: snd-usb: Fix uninitialized variable usage

Daniel Mack zonque at gmail.com
Sat Aug 6 00:23:18 CEST 2011


Purely cosmetic, but fixes the following build warning.

  CC [M]  sound/usb/quirks.o
sound/usb/quirks.c: In function ‘snd_usb_apply_boot_quirk’:
sound/usb/quirks.c:429:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Daniel Mack <zonque at gmail.com>
Cc: Takashi Iwai <tiwai at suse.de>
---
 sound/usb/quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 77762c9..81e07d8 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -426,7 +426,7 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
  */
 static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
 {
-	int err, reg;
+	int err  = 0, reg;
 	int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
 
 	for (reg = 0; reg < ARRAY_SIZE(val); reg++) {
-- 
1.7.6



More information about the Alsa-devel mailing list