diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 17:20:57 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-26 17:20:57 +0200 |
commit | 2924f096a816367c80cefc05036d8e9f5bd68f6c (patch) | |
tree | 62d22bdf27dc8834b5b0e7beef4f50ce52243ea4 /drivers/spi | |
parent | Merge remote-tracking branch 'spi/topic/bpw' into spi-next (diff) | |
parent | spi: coldfire-qspi: fix error return code in mcfqspi_probe() (diff) | |
download | linux-2924f096a816367c80cefc05036d8e9f5bd68f6c.tar.xz linux-2924f096a816367c80cefc05036d8e9f5bd68f6c.zip |
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; |