summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/men_z188_adc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc/men_z188_adc.c')
-rw-r--r--drivers/iio/adc/men_z188_adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/men_z188_adc.c b/drivers/iio/adc/men_z188_adc.c
index 6989c16aec2b..b58d6302521f 100644
--- a/drivers/iio/adc/men_z188_adc.c
+++ b/drivers/iio/adc/men_z188_adc.c
@@ -121,8 +121,8 @@ static int men_z188_probe(struct mcb_device *dev,
indio_dev->num_channels = ARRAY_SIZE(z188_adc_iio_channels);
mem = mcb_request_mem(dev, "z188-adc");
- if (!mem)
- return -ENOMEM;
+ if (IS_ERR(mem))
+ return PTR_ERR(mem);
adc->base = ioremap(mem->start, resource_size(mem));
if (adc->base == NULL)