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.