iio: adc: checking for NULL instead of IS_ERR() in probe

mcb_request_mem() returns an ERR_PTR(), it doesn't return NULL.

Fixes: 74aeac4da6 ('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
This commit is contained in:
Dan Carpenter 2014-03-28 08:33:00 +00:00 committed by Jonathan Cameron
parent 4f3bcd878f
commit e94f62e79f

View File

@ -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)