Message ID | 20170925161640.0D23644005B@finisterre.ee.mobilebroadband (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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; }