spi-topcliff-pch: Fix probing when DMA mode is used
authorAlexander Stein <alexander.stein@systec-electronic.com>
Wed, 26 Feb 2014 15:31:19 +0000 (16:31 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 27 Feb 2014 04:37:10 +0000 (13:37 +0900)
commit7995d74ab297e4f5526c8df70007e1e39f0d1f5c
tree88238f2de99a43fc1ac43f3811145712cc7d3c49
parent7611c7a5613f20ec2fb536c1d868d15045730bc0
spi-topcliff-pch: Fix probing when DMA mode is used

If during registering SPI master due to SPI device probing a SPI transfer
is issued the DMA buffers are not allocated yet.

This fixes the following oops:
pch_spi 0000:02:0c.1: enabling device (0000 -> 0002)
pch_spi 0000:02:0c.1: master is unqueued, this is deprecated
BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<c125aa05>] pch_spi_handle_dma+0x15c/0x6f4
[...]

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-topcliff-pch.c