Skip to content

Commit ae1b6b4

Browse files
Wolfram Sanggregkh
authored andcommitted
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>
1 parent 0c9c1ea commit ae1b6b4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,14 +1360,12 @@ static void sci_dma_rx_complete(void *arg)
13601360
return;
13611361

13621362
fail:
1363-
uart_port_unlock_irqrestore(port, flags);
1364-
dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
13651363
/* Switch to PIO */
1366-
uart_port_lock_irqsave(port, &flags);
13671364
dmaengine_terminate_async(chan);
13681365
sci_dma_rx_chan_invalidate(s);
13691366
sci_dma_rx_reenable_irq(s);
13701367
uart_port_unlock_irqrestore(port, flags);
1368+
dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n");
13711369
}
13721370

13731371
static void sci_dma_tx_release(struct sci_port *s)

0 commit comments

Comments
 (0)