summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-01-28 17:27:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-12 17:05:25 +0300
commit7885af04df6e4efd72910200c1bfc079d61202e4 (patch)
treeaf0af59a4fb94cc863cfa5d23b3065c0a65704e8
parent43c2b86ff633c34831c8430925ba73d7c20da1ad (diff)
downloadlinux-7885af04df6e4efd72910200c1bfc079d61202e4.tar.xz
serial: 8250_port: Drop duplicate NULL check
serial8250_release_dma() is NULL-aware, no need to check this in the caller. While at it, make sure DMA won't be used again, by NULLifying the pointer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://patch.msgid.link/20260128142726.128175-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index cc94af2d578a..c05a6df8d6b4 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2364,8 +2364,8 @@ void serial8250_do_shutdown(struct uart_port *port)
synchronize_irq(port->irq);
- if (up->dma)
- serial8250_release_dma(up);
+ serial8250_release_dma(up);
+ up->dma = NULL;
scoped_guard(uart_port_lock_irqsave, port) {
if (port->flags & UPF_FOURPORT) {