aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-03 09:00:35 -0500
committerTakashi Iwai <tiwai@suse.de>2009-03-03 09:00:35 -0500
commit82ad39f9391fca1d3177bd9f6a5264eff5b5346a (patch)
treef9fff89c53c4902b311566272bb5e802d41d5984 /sound
parentd02b1f3910f12cfe377a31afebcbbde4f5664b74 (diff)
ALSA: hda - Fix gcc compile warning
It's false positive, but annoying. sound/pci/hda/hda_codec.c: In function ‘get_empty_pcm_device’: sound/pci/hda/hda_codec.c:2772: warning: ‘dev’ may be used uninitialized in this function Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 7c9ef5c18e77..04cb1251e3e7 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2776,13 +2776,10 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
2776 for (i = 0; i < ARRAY_SIZE(audio_idx); i++) { 2776 for (i = 0; i < ARRAY_SIZE(audio_idx); i++) {
2777 dev = audio_idx[i]; 2777 dev = audio_idx[i];
2778 if (!test_bit(dev, bus->pcm_dev_bits)) 2778 if (!test_bit(dev, bus->pcm_dev_bits))
2779 break; 2779 goto ok;
2780 }
2781 if (i >= ARRAY_SIZE(audio_idx)) {
2782 snd_printk(KERN_WARNING "Too many audio devices\n");
2783 return -EAGAIN;
2784 } 2780 }
2785 break; 2781 snd_printk(KERN_WARNING "Too many audio devices\n");
2782 return -EAGAIN;
2786 case HDA_PCM_TYPE_SPDIF: 2783 case HDA_PCM_TYPE_SPDIF:
2787 case HDA_PCM_TYPE_HDMI: 2784 case HDA_PCM_TYPE_HDMI:
2788 case HDA_PCM_TYPE_MODEM: 2785 case HDA_PCM_TYPE_MODEM:
@@ -2797,6 +2794,7 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
2797 snd_printk(KERN_WARNING "Invalid PCM type %d\n", type); 2794 snd_printk(KERN_WARNING "Invalid PCM type %d\n", type);
2798 return -EINVAL; 2795 return -EINVAL;
2799 } 2796 }
2797 ok:
2800 set_bit(dev, bus->pcm_dev_bits); 2798 set_bit(dev, bus->pcm_dev_bits);
2801 return dev; 2799 return dev;
2802} 2800}