power: supply: axp288_fuel_gauge: remove redundant continue statement
authorColin Ian King <colin.king@canonical.com>
Fri, 18 Jun 2021 09:29:24 +0000 (10:29 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 29 Jun 2021 22:10:26 +0000 (00:10 +0200)
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>
drivers/power/supply/axp288_fuel_gauge.c

index a9c28a7..2ba2d8d 100644 (file)
@@ -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;
        }