Message ID | 20230307155543.31021-2-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] tty: serial: qcom-geni-serial: check correct dma address before unprep | expand |
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 5972b5c317d3..bb63a00f4c07 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -637,6 +637,9 @@ static void qcom_geni_serial_start_tx_dma(struct uart_port *uport) xmit_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); + if (!xmit_size) + return; + qcom_geni_serial_setup_tx(uport, xmit_size); ret = geni_se_tx_dma_prep(&port->se, &xmit->buf[xmit->tail],