summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-coldfire-qspi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-26 17:20:57 +0200
committerMark Brown <broonie@linaro.org>2013-06-26 17:20:57 +0200
commit2924f096a816367c80cefc05036d8e9f5bd68f6c (patch)
tree62d22bdf27dc8834b5b0e7beef4f50ce52243ea4 /drivers/spi/spi-coldfire-qspi.c
parentMerge remote-tracking branch 'spi/topic/bpw' into spi-next (diff)
parentspi: coldfire-qspi: fix error return code in mcfqspi_probe() (diff)
downloadlinux-2924f096a816367c80cefc05036d8e9f5bd68f6c.tar.xz
linux-2924f096a816367c80cefc05036d8e9f5bd68f6c.zip
Merge remote-tracking branch 'spi/topic/coldfire-qspi' into spi-next
Diffstat (limited to 'drivers/spi/spi-coldfire-qspi.c')
-rw-r--r--drivers/spi/spi-coldfire-qspi.c11
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;