Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
7885af04 43c2b86f

+2 -2
+2 -2
drivers/tty/serial/8250/8250_port.c
··· 2364 2364 2365 2365 synchronize_irq(port->irq); 2366 2366 2367 - if (up->dma) 2368 - serial8250_release_dma(up); 2367 + serial8250_release_dma(up); 2368 + up->dma = NULL; 2369 2369 2370 2370 scoped_guard(uart_port_lock_irqsave, port) { 2371 2371 if (port->flags & UPF_FOURPORT) {