[alsa-devel] [PATCH 1/5] sound: serial-u16550: fix uninitialized variable warning

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


Fix sound/drivers/serial-u16550.c:905: warning: 'uart' may be used
uninitialized in this function

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

diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index a25fb7b..5f8ae28 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -902,7 +902,7 @@ static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
 static int __devinit snd_serial_probe(struct platform_device *devptr)
 {
 	struct snd_card *card;
-	struct snd_uart16550 *uart;
+	struct snd_uart16550 *uninitialized_var(uart);
 	int err;
 	int dev = devptr->id;
 
-- 
1.7.2



More information about the Alsa-devel mailing list