diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-09-27 14:41:05 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-09-30 21:19:16 +0200 |
commit | 8f8e9b7388514d937843337140f18ceb0f3da6eb (patch) | |
tree | 89409187bf4eafce808213864cd3cfc45ac2d076 | |
parent | power: supply: mm8013: Fix error code in mm8013_probe() (diff) | |
download | linux-8f8e9b7388514d937843337140f18ceb0f3da6eb.tar.xz linux-8f8e9b7388514d937843337140f18ceb0f3da6eb.zip |
power: supply: mm8013: Fix an error checking issue in mm8013_checkdevice()
There is a missing "ret = " assignment so this checks the same "ret"
value twice.
Fixes: c75f4bf6800b ("power: supply: Introduce MM8013 fuel gauge driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/c46b4408-bf1d-408d-9e6b-16b0ad272532@moroto.mountain
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r-- | drivers/power/supply/mm8013.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/mm8013.c b/drivers/power/supply/mm8013.c index 29fd65fe6545..caa272b03564 100644 --- a/drivers/power/supply/mm8013.c +++ b/drivers/power/supply/mm8013.c @@ -53,7 +53,7 @@ static int mm8013_checkdevice(struct mm8013_chip *chip) if (ret < 0) return ret; - regmap_read(chip->regmap, REG_BATID, &val); + ret = regmap_read(chip->regmap, REG_BATID, &val); if (ret < 0) return ret; |