Skip to content

Commit 68f300d

Browse files
rriveramcruskartben
authored andcommitted
charger: bq25713: Corrects unsigned int comparison
Removes an unnecessary comparison of an unsigned int against the value zero. Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
1 parent 578a701 commit 68f300d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/charger/charger_bq25713.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ static int bq25713_set_minimum_system_voltage(const struct device *dev, uint32_t
165165

166166
static int bq25713_set_constant_charge_current(const struct device *dev, uint32_t current_ua)
167167
{
168-
if (!IN_RANGE(current_ua, BQ25713_REG_CC_CHARGE_CURRENT_MIN_UA,
169-
BQ25713_REG_CC_CHARGE_CURRENT_MAX_UA)) {
168+
if (current_ua > BQ25713_REG_CC_CHARGE_CURRENT_MAX_UA) {
170169
LOG_WRN("charging current out of range: %umA, "
171170
"clamping to the nearest limit",
172171
current_ua / BQ25713_FACTOR_U_TO_M);

0 commit comments

Comments
 (0)