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>
This commit is contained in:
Andy Shevchenko 2026-01-28 15:27:26 +01:00 committed by Greg Kroah-Hartman
parent 43c2b86ff6
commit 7885af04df

View File

@ -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) {