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: c75f4bf680 ("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>
This commit is contained in:
Dan Carpenter 2023-09-27 15:41:05 +03:00 committed by Sebastian Reichel
parent 43ee22422d
commit 8f8e9b7388

View file

@ -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;