summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-sprd-adi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-sprd-adi.c')
-rw-r--r--drivers/spi/spi-sprd-adi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 0d481f8a46c2..bff6ef1caad7 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -341,8 +341,8 @@ static int sprd_adi_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
sadi->base = devm_ioremap_resource(&pdev->dev, res);
- if (!sadi->base) {
- ret = -ENOMEM;
+ if (IS_ERR(sadi->base)) {
+ ret = PTR_ERR(sadi->base);
goto put_ctlr;
}