mtd: spinand: toshiba: Support for new Kioxia Serial NAND
[oweals/u-boot.git] / drivers / power / mfd / fg_max77693.c
index 4519fed49744518cd3b0d9a9414ec298e6082459..983a6d4a2bde6d815f18fe5c1b2950a328eed5dc 100644 (file)
@@ -1,11 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2013 Samsung Electronics
  * Piotr Wilczek <p.wilczek@samsung.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/max77693_fg.h>
 #include <i2c.h>
@@ -52,7 +52,7 @@ static int power_update_battery(struct pmic *p, struct pmic *bat)
 
        if (pmic_probe(p)) {
                puts("Can't find max77693 fuel gauge\n");
-               return -1;
+               return -ENODEV;
        }
 
        ret = max77693_get_soc(&pb->bat->state_of_chrg);
@@ -60,8 +60,6 @@ static int power_update_battery(struct pmic *p, struct pmic *bat)
                return ret;
 
        max77693_get_vcell(&pb->bat->voltage_uV);
-       if (ret)
-               return ret;
 
        return 0;
 }
@@ -74,7 +72,7 @@ static int power_check_battery(struct pmic *p, struct pmic *bat)
 
        if (pmic_probe(p)) {
                puts("Can't find max77693 fuel gauge\n");
-               return -1;
+               return -ENODEV;
        }
 
        ret = pmic_reg_read(p, MAX77693_STATUS, &val);