summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-07 14:51:57 +0100
committerMark Brown <broonie@linaro.org>2013-10-07 14:51:57 +0100
commit5acb8bb4412554db6346a4010c04e7e0f57324d0 (patch)
tree3459802b1309f4b5b0273fc11df6ff795b2c051b /drivers/spi
parenta19be58c9cfbc95a009e54013e6bc8f38f1ea82a (diff)
parent272bfbd54f29b9361b09dbd6b25ccbd1a30163f1 (diff)
downloadlinux-5acb8bb4412554db6346a4010c04e7e0f57324d0.tar.bz2
Merge remote-tracking branch 'spi/fix/dspi' into spi-linus
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-fsl-dspi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 6cd07d13ecab..4e44575bd87a 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -476,15 +476,9 @@ static int dspi_probe(struct platform_device *pdev)
master->bus_num = bus_num;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "can't get platform resource\n");
- ret = -EINVAL;
- goto out_master_put;
- }
-
dspi->base = devm_ioremap_resource(&pdev->dev, res);
- if (!dspi->base) {
- ret = -EINVAL;
+ if (IS_ERR(dspi->base)) {
+ ret = PTR_ERR(dspi->base);
goto out_master_put;
}