From: Xichao Zhao Date: Tue, 9 Sep 2025 02:09:25 +0000 (+0800) Subject: power: supply: rx51: remove redundant condition checks X-Git-Tag: v6.18-rc1~157^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bafaa156ed3881cd4f187ab1c43e408742e1f11;p=thirdparty%2Flinux.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 7cdcd415e8684..b0220ec2d9266 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;