Fix trivial typo in the equation to check upper bound of current setting.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
while (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel < min_uA)
sel++;
- if (chg_min_uA * CHGIN_ILIM_STEP_20mA * sel > max_uA)
+ if (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel > max_uA)
return -EINVAL;
/* the first four codes for charger current are all 60mA */