mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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:
parent
43ee22422d
commit
8f8e9b7388
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue