spi: coldfire-qspi: Prevent NULL pointer dereference
authorAxel Lin <axel.lin@ingics.com>
Sun, 9 Mar 2014 06:11:10 +0000 (14:11 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 10 Mar 2014 16:06:45 +0000 (16:06 +0000)
commit2271cf124a2763b7252887814a7fc8a844767e8f
tree2aa554da7a1af8000ac7c5c594123f1b6de0b5b7
parent2aa237f4a1a72813f9684a0ce6e48288e75de479
spi: coldfire-qspi: Prevent NULL pointer dereference

If pdata->cs_control is NULL, we will hit NULL pointer dereference in
mcfqspi_cs_select() and mcfqspi_cs_deselect(). Thus add NULL test for
pdata->cs_control in probe().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-coldfire-qspi.c