From: Colin Ian King Date: Fri, 18 Jun 2021 09:29:24 +0000 (+0100) Subject: power: supply: axp288_fuel_gauge: remove redundant continue statement X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f390e4bd79289b85bfe345d4d9d160dc4926dfc1;p=linux.git 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 Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c index a9c28a725818a..2ba2d8d6b8e63 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; }