diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-07 15:51:57 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-07 15:51:57 +0200 |
commit | 5acb8bb4412554db6346a4010c04e7e0f57324d0 (patch) | |
tree | 3459802b1309f4b5b0273fc11df6ff795b2c051b /drivers/spi | |
parent | Merge remote-tracking branch 'spi/fix/clps711x' into spi-linus (diff) | |
parent | spi: fix return value check in dspi_probe() (diff) | |
download | linux-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.c | 10 |
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; } |