diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 16:20:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-26 16:20:57 +0100 |
commit | 2924f096a816367c80cefc05036d8e9f5bd68f6c (patch) | |
tree | 62d22bdf27dc8834b5b0e7beef4f50ce52243ea4 /drivers/spi | |
parent | 4581949d522f22d0d9ab710b4a7253754349f5d8 (diff) | |
parent | 4a577f5275e948f96ea1a9bbce5d994ec6db618b (diff) |
Merge remote-tracking branch 'spi/topic/coldfire-qspi' into spi-next
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-coldfire-qspi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 9a7db9d1b4ca..15cda45afec6 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c @@ -400,6 +400,12 @@ static int mcfqspi_probe(struct platform_device *pdev) struct mcfqspi_platform_data *pdata; int status; + pdata = pdev->dev.platform_data; + if (!pdata) { + dev_dbg(&pdev->dev, "platform data is missing\n"); + return -ENOENT; + } + master = spi_alloc_master(&pdev->dev, sizeof(*mcfqspi)); if (master == NULL) { dev_dbg(&pdev->dev, "spi_alloc_master failed\n"); @@ -450,11 +456,6 @@ static int mcfqspi_probe(struct platform_device *pdev) } clk_enable(mcfqspi->clk); - pdata = pdev->dev.platform_data; - if (!pdata) { - dev_dbg(&pdev->dev, "platform data is missing\n"); - goto fail4; - } master->bus_num = pdata->bus_num; master->num_chipselect = pdata->num_chipselect; |