summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-07 15:51:57 +0200
committerMark Brown <broonie@linaro.org>2013-10-07 15:51:57 +0200
commit5acb8bb4412554db6346a4010c04e7e0f57324d0 (patch)
tree3459802b1309f4b5b0273fc11df6ff795b2c051b /drivers/spi
parentMerge remote-tracking branch 'spi/fix/clps711x' into spi-linus (diff)
parentspi: fix return value check in dspi_probe() (diff)
downloadlinux-5acb8bb4412554db6346a4010c04e7e0f57324d0.tar.xz
linux-5acb8bb4412554db6346a4010c04e7e0f57324d0.zip
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;
}