[alsa-devel] [PATCH 2/5] sound: fix uninitialized variable warning

Bill Pemberton wfp5p at virginia.edu
Tue Aug 3 21:20:23 CEST 2010


quiet the warning:
sound/pci/atiixp.c:1652: warning: 'chip' may be used uninitialized in
this function

chip is set by snd_atiixp_create()

Signed-off-by: Bill Pemberton <wfp5p at virginia.edu>
---
 sound/pci/atiixp_modem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 91d7036..ef9524a 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1285,7 +1285,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
 				      const struct pci_device_id *pci_id)
 {
 	struct snd_card *card;
-	struct atiixp_modem *chip;
+	struct atiixp_modem *uninitialized_var(chip);
 	int err;
 
 	err = snd_card_create(index, id, THIS_MODULE, 0, &card);
-- 
1.7.2



More information about the Alsa-devel mailing list