From: Axel Lin Date: Sat, 29 Jun 2013 03:37:29 +0000 (+0800) Subject: regulator: max77693: Fix trivial typo X-Git-Tag: accepted/tizen/common/20141203.182822~1944^2~11^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3ecdd7bf6a782a6eafe9c2c5d39fcb487e2a154;p=platform%2Fkernel%2Flinux-arm64.git regulator: max77693: Fix trivial typo Fix trivial typo in the equation to check upper bound of current setting. Signed-off-by: Axel Lin Acked-by: Jonghwa Lee Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index 674ece7..d45a4dd 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c @@ -97,7 +97,7 @@ static int max77693_chg_set_current_limit(struct regulator_dev *rdev, 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 */