Re: [PATCH] tty: serial: pch_uart: add check for dma_alloc_coherent()
From: Andy Shevchenko
Date: Wed Apr 08 2026 - 09:22:45 EST
On Wed, Apr 08, 2026 at 03:24:21PM +0800, Zhaoyang Yu wrote:
> Add a check for dma_alloc_coherent() failure to prevent a potential
> NULL pointer dereference in dma_handle_rx(). Properly release DMA
> channels and the PCI device reference using a goto ladder if the
> allocation fails.
Looks like it deserves a Fixes tag.
Also ideally this driver should be converted to one of 8250 cases.
The latter has already DMA support. Note, if you are going this
direction, I have the hardware to test.
--
With Best Regards,
Andy Shevchenko