mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
spi: dw-mid: check that DMA was inited before exit
commitfb57862eadupstream. If the driver was compiled with DMA support, but DMA channels weren't acquired by some reason, mid_spi_dma_exit() will crash the kernel. Fixes:7063c0d942(spi/dw_spi: add DMA support) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3f8ae85b8a
commit
0ee097ac8e
@@ -89,6 +89,8 @@ err_exit:
|
||||
|
||||
static void mid_spi_dma_exit(struct dw_spi *dws)
|
||||
{
|
||||
if (!dws->dma_inited)
|
||||
return;
|
||||
dma_release_channel(dws->txchan);
|
||||
dma_release_channel(dws->rxchan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user