diff options
| author | Axel Lin <[email protected]> | 2015-08-30 10:35:51 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2015-08-30 11:14:36 +0000 |
| commit | 37c5db7938093cada165146ee99bd57c97baf6a3 (patch) | |
| tree | 92b0a40a30d703c19acb26a10b5723124d9de8a8 /drivers/spi/spi-fsl-spi.c | |
| parent | spi: fsl-espi: add runtime PM (diff) | |
| download | kernel-37c5db7938093cada165146ee99bd57c97baf6a3.tar.gz kernel-37c5db7938093cada165146ee99bd57c97baf6a3.zip | |
spi: fsl-(e)spi: Fix checking return value of devm_ioremap_resource
devm_ioremap_resource() returns ERR_PTR on error.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-fsl-spi.c')
| -rw-r--r-- | drivers/spi/spi-fsl-spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index 17a9a879dcce..8b290d9d7935 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -633,8 +633,8 @@ static struct spi_master * fsl_spi_probe(struct device *dev, goto err_cpm_init; mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem); - if (mpc8xxx_spi->reg_base == NULL) { - ret = -ENOMEM; + if (IS_ERR(mpc8xxx_spi->reg_base)) { + ret = PTR_ERR(mpc8xxx_spi->reg_base); goto err_probe; } |
