From: Xichao Zhao Date: Tue, 9 Sep 2025 02:09:25 +0000 (+0800) Subject: power: supply: rx51: remove redundant condition checks X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1bafaa156ed3881cd4f187ab1c43e408742e1f11;p=users%2Fhch%2Fmisc.git power: supply: rx51: remove redundant condition checks Remove redundant condition checks and replace else if with else. Signed-off-by: Xichao Zhao Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/rx51_battery.c b/drivers/power/supply/rx51_battery.c index 7cdcd415e868..b0220ec2d926 100644 --- a/drivers/power/supply/rx51_battery.c +++ b/drivers/power/supply/rx51_battery.c @@ -116,7 +116,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di) int mid = (max + min) / 2; if (rx51_temp_table2[mid] <= raw) min = mid; - else if (rx51_temp_table2[mid] > raw) + else max = mid; if (rx51_temp_table2[mid] == raw) break;