diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-08-30 06:35:51 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-30 07:14:36 -0400 |
commit | 37c5db7938093cada165146ee99bd57c97baf6a3 (patch) | |
tree | 92b0a40a30d703c19acb26a10b5723124d9de8a8 /drivers/spi/spi-fsl-spi.c | |
parent | e9abb4db8d108624c293f06dce06b2978e626a13 (diff) |
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
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, | |||
633 | goto err_cpm_init; | 633 | goto err_cpm_init; |
634 | 634 | ||
635 | mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem); | 635 | mpc8xxx_spi->reg_base = devm_ioremap_resource(dev, mem); |
636 | if (mpc8xxx_spi->reg_base == NULL) { | 636 | if (IS_ERR(mpc8xxx_spi->reg_base)) { |
637 | ret = -ENOMEM; | 637 | ret = PTR_ERR(mpc8xxx_spi->reg_base); |
638 | goto err_probe; | 638 | goto err_probe; |
639 | } | 639 | } |
640 | 640 | ||