summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-04-30 10:06:54 +0800
committerMark Brown <broonie@kernel.org>2015-05-01 17:35:54 +0100
commitb2b3024ca5853b3ea6390a3388e4761fc16e0655 (patch)
treed87bd477b9571b427a46ca312b23961b4ced3499 /drivers/spi
parent4a1ae8be4563d29ddd36f46759191f4e867ed954 (diff)
downloadop-kernel-dev-b2b3024ca5853b3ea6390a3388e4761fc16e0655.zip
op-kernel-dev-b2b3024ca5853b3ea6390a3388e4761fc16e0655.tar.gz
spi: rb4xx: Fix checking return value of devm_ioremap_resource()
devm_ioremap_resource() returns ERR_PTR on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-rb4xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
index 50f49f3..3641d0e 100644
--- a/drivers/spi/spi-rb4xx.c
+++ b/drivers/spi/spi-rb4xx.c
@@ -145,7 +145,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
spi_base = devm_ioremap_resource(&pdev->dev, r);
- if (!spi_base)
+ if (IS_ERR(spi_base))
return PTR_ERR(spi_base);
master = spi_alloc_master(&pdev->dev, sizeof(*rbspi));
OpenPOWER on IntegriCloud