ALSA: sound/usb/format: silence uninitialized variable warnings

Gcc complains that ret might be used uninitialized:

sound/usb/format.c: In function ‘snd_usb_parse_audio_format’:
sound/usb/format.c:354: warning: ‘ret’ may be used uninitialized in this function
sound/usb/format.c:354: note: ‘ret’ was declared here
sound/usb/format.c:414: warning: ‘ret’ may be used uninitialized in this function
sound/usb/format.c:414: note: ‘ret’ was declared here

I suppose it could be uninitialized if there is ever a UAC_VERSION_3
released. Anyway this patch is worthwhile if only to silence the gcc
warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Dan Carpenter and committed by Takashi Iwai 38d7b08f 31cbd977

+8
+8
sound/usb/format.c
··· 392 /* fp->channels is already set in this case */ 393 ret = parse_audio_format_rates_v2(chip, fp); 394 break; 395 } 396 397 if (fp->channels < 1) { ··· 456 ret = parse_audio_format_rates_v2(chip, fp); 457 break; 458 } 459 } 460 461 return ret;
··· 392 /* fp->channels is already set in this case */ 393 ret = parse_audio_format_rates_v2(chip, fp); 394 break; 395 + default: 396 + snd_printk(KERN_ERR "%d:%u:%d : invalid protocol version %d\n", 397 + chip->dev->devnum, fp->iface, fp->altsetting, protocol); 398 + return -EINVAL; 399 } 400 401 if (fp->channels < 1) { ··· 452 ret = parse_audio_format_rates_v2(chip, fp); 453 break; 454 } 455 + default: 456 + snd_printk(KERN_ERR "%d:%u:%d : invalid protocol version %d\n", 457 + chip->dev->devnum, fp->iface, fp->altsetting, protocol); 458 + return -EINVAL; 459 } 460 461 return ret;