[PATCH] power: supply: mm8013: Fix an error checking issue in mm8013_checkdevice()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/power/supply/mm8013.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux