]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/8250.c
Fix possible NULL pointer access in 8250 serial driver
[linux-2.6-omap-h63xx.git] / drivers / serial / 8250.c
index c129a0e8e8070166144e2cf9f8a1fe3003d19766..c0c472ac531196e9df1c8576386e0a1613d73813 100644 (file)
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
 {
        unsigned int status = serial_in(up, UART_MSR);
 
-       if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) {
+       if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
+           up->port.info != NULL) {
                if (status & UART_MSR_TERI)
                        up->port.icount.rng++;
                if (status & UART_MSR_DDSR)