1 From c5cbc78acf693f5605d4a85b1327fa7933daf092 Mon Sep 17 00:00:00 2001
2 From: Nathan Chancellor <natechancellor@gmail.com>
3 Date: Fri, 8 Mar 2019 11:37:44 -0700
4 Subject: tty: serial: qcom_geni_serial: Initialize baud in qcom_geni_console_setup
6 From: Nathan Chancellor <natechancellor@gmail.com>
8 commit c5cbc78acf693f5605d4a85b1327fa7933daf092 upstream.
10 When building with -Wsometimes-uninitialized, Clang warns:
12 drivers/tty/serial/qcom_geni_serial.c:1079:6: warning: variable 'baud'
13 is used uninitialized whenever 'if' condition is false
14 [-Wsometimes-uninitialized]
16 It's not wrong; when options is NULL, baud has no default value. Use
17 9600 as that is a sane default.
19 Link: https://github.com/ClangBuiltLinux/linux/issues/395
20 Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
22 Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
23 Cc: stable <stable@vger.kernel.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 drivers/tty/serial/qcom_geni_serial.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
30 --- a/drivers/tty/serial/qcom_geni_serial.c
31 +++ b/drivers/tty/serial/qcom_geni_serial.c
32 @@ -1052,7 +1052,7 @@ static int __init qcom_geni_console_setu
34 struct uart_port *uport;
35 struct qcom_geni_serial_port *port;