msm: serial: Add check for c_cflag with NULL in set_termios

Serial console doesn't work when shell on console functionality
is disable and resuming from system suspend. termios values are
seen with zero when shell on console is not enabled and resuming
uart from suspend which is putting UART controller in abnormal
state. Hence check for c_cflag value in set_termios for NULL,
and doesn't proceed with changing the UART controller register
with wrong values.

Change-Id: I0e049eec6379ba23a02c2831c20d33e28e1b24f1
CRs-Fixed: 356097
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 32e9dc0..72bc8de 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -626,6 +626,9 @@
 	unsigned long flags;
 	unsigned int baud, mr;
 
+	if (!termios->c_cflag)
+		return;
+
 	spin_lock_irqsave(&port->lock, flags);
 
 	/* calculate and set baud rate */