Skip to content

Commit 95fcfc0

Browse files
jhovoldgregkh
authored andcommitted
serial: qcom-geni: fix DMA mapping leak on shutdown
Fix what appears to be a copy-paste error that can lead to a leaked DMA mapping on close() and failure to restart TX after the port is reopened. Note that rx_dma_addr is generally NULL when qcom_geni_serial_stop_tx_dma() is called as part of shutdown() (but tx_dma_addr need not be). Fixes: 2aaa43c ("tty: serial: qcom-geni-serial: add support for serial engine DMA") Cc: stable <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]> Tested-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sa8540p-ride Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9aff74c commit 95fcfc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/qcom_geni_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static void qcom_geni_serial_stop_tx_dma(struct uart_port *uport)
596596
if (!qcom_geni_serial_main_active(uport))
597597
return;
598598

599-
if (port->rx_dma_addr) {
599+
if (port->tx_dma_addr) {
600600
geni_se_tx_dma_unprep(&port->se, port->tx_dma_addr,
601601
port->tx_remaining);
602602
port->tx_dma_addr = 0;

0 commit comments

Comments
 (0)