power: supply: rx51: remove redundant condition checks
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 9 Sep 2025 02:09:25 +0000 (10:09 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 17 Sep 2025 23:01:03 +0000 (01:01 +0200)
Remove redundant condition checks and replace else if with else.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rx51_battery.c

index 7cdcd41..b0220ec 100644 (file)
@@ -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;