diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-03-28 04:33:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-06-14 11:16:43 -0400 |
commit | e94f62e79f7f63a68574ee5e76c19837ec12f3db (patch) | |
tree | a3bdd460676e2224f839bda6ce608c3f4e5e70e9 /drivers/iio | |
parent | 4f3bcd878f1d3c730fe00f619b7260c6125d49eb (diff) |
iio: adc: checking for NULL instead of IS_ERR() in probe
mcb_request_mem() returns an ERR_PTR(), it doesn't return NULL.
Fixes: 74aeac4da66f ('iio: adc: Add MEN 16z188 ADC driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/men_z188_adc.c | 4 |
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, | |||
121 | indio_dev->num_channels = ARRAY_SIZE(z188_adc_iio_channels); | 121 | indio_dev->num_channels = ARRAY_SIZE(z188_adc_iio_channels); |
122 | 122 | ||
123 | mem = mcb_request_mem(dev, "z188-adc"); | 123 | mem = mcb_request_mem(dev, "z188-adc"); |
124 | if (!mem) | 124 | if (IS_ERR(mem)) |
125 | return -ENOMEM; | 125 | return PTR_ERR(mem); |
126 | 126 | ||
127 | adc->base = ioremap(mem->start, resource_size(mem)); | 127 | adc->base = ioremap(mem->start, resource_size(mem)); |
128 | if (adc->base == NULL) | 128 | if (adc->base == NULL) |