[warnings] [2/8] fix uninitialized quot in drivers/serial/core.c

From: wli@holomorphy.com
Date: Thu Dec 05 2002 - 05:52:59 EST


Give quot a default value so it's initialized. rmk, this is yours
to ack.

===== drivers/serial/core.c 1.24 vs edited =====
--- 1.24/drivers/serial/core.c Sun Dec 1 08:37:25 2002
+++ edited/drivers/serial/core.c Thu Dec 5 00:59:44 2002
@@ -387,7 +387,7 @@
 uart_get_divisor(struct uart_port *port, struct termios *termios,
                  struct termios *old_termios)
 {
- unsigned int quot, try;
+ unsigned int quot = 0, try;
 
         for (try = 0; try < 3; try ++) {
                 unsigned int baud;
@@ -416,7 +416,7 @@
                 termios->c_cflag |= B9600;
         }
 
- return quot;
+ return quot ? quot : 1;
 }
 
 EXPORT_SYMBOL(uart_get_divisor);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:22 EST