[PATCH v4 2/4] iio: adc: ad7091r5: Add scale and external VREF support

Dan Carpenter dan.carpenter at oracle.com
Fri Nov 15 13:03:59 UTC 2019


On Fri, Nov 15, 2019 at 02:23:14PM +0200, Beniamin Bia wrote:
> @@ -216,6 +240,21 @@ int ad7091r_probe(struct device *dev, const char *name,
>  			return ret;
>  	}
>  
> +	st->vref = devm_regulator_get_optional(dev, "vref");
> +	if (IS_ERR(st->vref)) {
> +		if (PTR_ERR(st->vref) == EPROBE_DEFER)
                                      ^^^^^^^^^^^^^^^
Missing - on EPROBE_DEFER.

> +			return -EPROBE_DEFER;
> +
> +		st->vref = NULL;
> +	} else {
> +		ret = regulator_enable(st->vref);
> +		if (ret)
> +			return ret;
> +		ret = devm_add_action_or_reset(dev, ad7091r_remove, st);
> +		if (ret)
> +			return ret;
> +		}

Curly brace is indented an extra tab.

regards,
dan carpenter


More information about the devel mailing list