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)
committerMark Brown <broonie@kernel.org>
Sat, 13 Sep 2014 16:01:57 +0000 (17:01 +0100)
commitfb57862ead652454ceeb659617404c5f13bc34b5
treefbb408839ae0cd552828a8b29fa5ec4cf625558a
parent05ed2aee3e97c9cfb737388706b439264e27eb0c
spi: dw-mid: check that DMA was inited before exit

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>
drivers/spi/spi-dw-mid.c