Re: [Patch 5/11] Regulator: DA9052 regulator support v2

Mark Brown
2011-07-05T16:28:48Z

On Wed, Jun 29, 2011 at 06:46:03PM +0530, ashishj3 wrote:

> +static int verify_range(struct da9052_regulator_info *info,
> + int min_uV, int max_uV)
> +{
> + if (min_uV < info->min_uV || min_uV > info->max_uV)
> + return -EINVAL;
> + if (max_uV < info->min_uV || max_uV > info->max_uV)
> + return -EINVAL;

This is broken, think about what it's trying to do - it's trying to
check that the regulator can deliver a voltage within the requested
range. These checks don't help with that.