iio:ad7266: Fix broken regulator error handling
[platform/kernel/linux-rpi.git] / drivers / iio / adc / ad7266.c
index 21e19b6..835d45d 100644 (file)
@@ -397,7 +397,7 @@ static int ad7266_probe(struct spi_device *spi)
        st = iio_priv(indio_dev);
 
        st->reg = devm_regulator_get(&spi->dev, "vref");
-       if (!IS_ERR_OR_NULL(st->reg)) {
+       if (!IS_ERR(st->reg)) {
                ret = regulator_enable(st->reg);
                if (ret)
                        return ret;