summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2024-05-06 13:40:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-10 11:48:33 +0100
commitae1b6b4c0a0c93a53cb897e54c84079a017cd9d0 (patch)
tree67b22aad2a332073bef11a3b8b515d16e6940bc6 /drivers/tty
parent0c9c1ea583f1b9887d248dc26f6921c4ae826b96 (diff)
downloadlwn-ae1b6b4c0a0c93a53cb897e54c84079a017cd9d0.tar.gz
lwn-ae1b6b4c0a0c93a53cb897e54c84079a017cd9d0.zip
serial: sh-sci: simplify locking when re-issuing RXDMA fails
Avoid a superfluous unlock/lock-pair by simply moving the printout to the end of bailing out. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20240506114016.30498-10-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index d31b3aca5987..f738980a8b2c 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1360,14 +1360,12 @@ static void sci_dma_rx_complete(void *arg)
return;
fail:
- uart_port_unlock_irqrestore(port, flags);
- dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
/* Switch to PIO */
- uart_port_lock_irqsave(port, &flags);
dmaengine_terminate_async(chan);
sci_dma_rx_chan_invalidate(s);
sci_dma_rx_reenable_irq(s);
uart_port_unlock_irqrestore(port, flags);
+ dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
}
static void sci_dma_tx_release(struct sci_port *s)