drivers/char/synclink_gt.c: don't return an uninitialised local
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2008 21:02:34 +0000 (14:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 May 2008 15:02:26 +0000 (08:02 -0700)
drivers/char/synclink_gt.c: In function 'put_char':
drivers/char/synclink_gt.c:919: warning: 'ret' may be used uninitialized in this function

The compiler speaketh truth.

Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/synclink_gt.c

index 2001b0e..55c1653 100644 (file)
@@ -916,7 +916,7 @@ static int put_char(struct tty_struct *tty, unsigned char ch)
 {
        struct slgt_info *info = tty->driver_data;
        unsigned long flags;
-       int ret;
+       int ret = 0;
 
        if (sanity_check(info, tty->name, "put_char"))
                return 0;