spi: dw-mid: check that DMA was inited before exit
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 12 Sep 2014 12:11:58 +0000 (15:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:38:20 +0000 (09:38 -0700)
commit4e973d3174fe8d683c382bc5261a3d8643f91242
tree2857a9dffab21301fe9bcb3f7d8c0632047165c1
parent65eea26bfac18b939ef8274785831bdd74fb12f8
spi: dw-mid: check that DMA was inited before exit

commit fb57862ead652454ceeb659617404c5f13bc34b5 upstream.

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: 7063c0d942a1 (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>
drivers/spi/spi-dw-mid.c