summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/bq256xx_charger.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-03-18 20:14:12 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-03-18 20:14:42 +0100
commit4e371d996590f3a7e82a086d499c912c1930e968 (patch)
tree0c7b300670901f498238b32e59c307eddf338489 /drivers/power/supply/bq256xx_charger.c
parentmtd: nand: ecc: mxic: Fix compile test issue (diff)
parentmtd: spi-nor: Skip erase logic when SPI_NOR_NO_ERASE is set (diff)
downloadlinux-4e371d996590f3a7e82a086d499c912c1930e968.tar.xz
linux-4e371d996590f3a7e82a086d499c912c1930e968.zip
Merge tag 'spi-nor/for-5.18' into mtd/next
SPI NOR core changes: - move vendor specific code out of the core into vendor drivers. - unify all function and object names in the vendor modules. - make setup() callback optional to improve readability. - skip erase logic when the SPI_NOR_NO_ERASE flag is set at flash declaration. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/power/supply/bq256xx_charger.c')
-rw-r--r--drivers/power/supply/bq256xx_charger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/supply/bq256xx_charger.c b/drivers/power/supply/bq256xx_charger.c
index b274942dc46a..01ad84fd147c 100644
--- a/drivers/power/supply/bq256xx_charger.c
+++ b/drivers/power/supply/bq256xx_charger.c
@@ -1523,6 +1523,9 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
BQ256XX_WDT_BIT_SHIFT);
ret = power_supply_get_battery_info(bq->charger, &bat_info);
+ if (ret == -ENOMEM)
+ return ret;
+
if (ret) {
dev_warn(bq->dev, "battery info missing, default values will be applied\n");