summaryrefslogtreecommitdiff
path: root/drivers/power/supply/axp288_fuel_gauge.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-06-18 12:29:24 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-06-30 01:10:26 +0300
commitf390e4bd79289b85bfe345d4d9d160dc4926dfc1 (patch)
treee41ac56b8ef60982a48ac798ffa8cd366e14c60b /drivers/power/supply/axp288_fuel_gauge.c
parent3a06b912a5ce494d7b7300b12719c562be7b566f (diff)
downloadlinux-f390e4bd79289b85bfe345d4d9d160dc4926dfc1.tar.xz
power: supply: axp288_fuel_gauge: remove redundant continue statement
The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/axp288_fuel_gauge.c')
-rw-r--r--drivers/power/supply/axp288_fuel_gauge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index a9c28a725818..2ba2d8d6b8e6 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -142,9 +142,7 @@ static int fuel_gauge_reg_readb(struct axp288_fg_info *info, int reg)
for (i = 0; i < NR_RETRY_CNT; i++) {
ret = regmap_read(info->regmap, reg, &val);
- if (ret == -EBUSY)
- continue;
- else
+ if (ret != -EBUSY)
break;
}