From: Axel Lin <axel.lin@gmail.com>
To: Liam Girdwood <lrg@ti.com>
Cc: linux-kernel@vger.kernel.org, "AnilKumar,
Chimata" <anilkumar@ti.com>, "Nori, Sekhar" <nsekhar@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage
Date: Tue, 03 Jul 2012 11:05:55 +0800 [thread overview]
Message-ID: <1341284755.18757.5.camel@phoenix> (raw)
In-Reply-To: <1341284473.18757.2.camel@phoenix>
It is ok to request voltage with min_uV < tps->info[rid]->min_uV and
max_uV > tps->info[rid]->max_uV
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/tps65217-regulator.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 0a3df5b..0947a09 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -206,10 +206,7 @@ static int tps65217_pmic_map_voltage(struct regulator_dev *dev,
if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
return -EINVAL;
- if (min_uV < tps->info[rid]->min_uV || min_uV > tps->info[rid]->max_uV)
- return -EINVAL;
-
- if (max_uV < tps->info[rid]->min_uV || max_uV > tps->info[rid]->max_uV)
+ if (max_uV < tps->info[rid]->min_uV || min_uV > tps->info[rid]->max_uV)
return -EINVAL;
ret = tps->info[rid]->uv_to_vsel(min_uV, &sel);
--
1.7.9.5
next prev parent reply other threads:[~2012-07-03 3:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 3:01 [PATCH 1/2] regulator: ad5398: Fix min/max current limit boundary checking Axel Lin
2012-07-03 3:05 ` Axel Lin [this message]
2012-07-03 4:46 ` [PATCH 2/2] regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage AnilKumar, Chimata
2012-07-03 5:26 ` Axel Lin
2012-07-03 6:48 ` AnilKumar, Chimata
2012-07-03 7:09 ` Axel Lin
2012-07-03 7:16 ` AnilKumar, Chimata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341284755.18757.5.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=anilkumar@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=nsekhar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox