[alsa-devel] [PATCH 2/4] SOUND: serial-u16550, use unitialized_var(uart)

Jiri Slaby jirislaby at gmail.com
Tue Aug 25 22:59:35 CEST 2009

To avoid a wrong compiler warning, use unitialized_var(uart) in

If uart is unitialized, we return before its use.

Signed-off-by: Jiri Slaby <jirislaby at gmail.com>
Cc: Takashi Iwai <tiwai at suse.de>
Cc: Jaroslav Kysela <perex at perex.cz>
Cc: Isaku Yamahata <yamahata at private.email.ne.jp>
Cc: George Hansper <ghansper at apana.org.au>
 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;

More information about the Alsa-devel mailing list