diff mbox series

[4/4] power: supply: sc2731_charger: Free battery information

Message ID ac427c3cca2cc783a82a3d8d62270c1ed139e8c4.1542019800.git.baolin.wang@linaro.org
State New
Headers show
Series None | expand

Commit Message

(Exiting) Baolin Wang Nov. 12, 2018, 10:52 a.m. UTC
Free battery information in case of adding battery OCV tables.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

---
 drivers/power/supply/sc2731_charger.c |    2 ++
 1 file changed, 2 insertions(+)

-- 
1.7.9.5
diff mbox series

Patch

diff --git a/drivers/power/supply/sc2731_charger.c b/drivers/power/supply/sc2731_charger.c
index 49b3f0c..335cb85 100644
--- a/drivers/power/supply/sc2731_charger.c
+++ b/drivers/power/supply/sc2731_charger.c
@@ -408,6 +408,8 @@  static int sc2731_charger_hw_init(struct sc2731_charger_info *info)
 			vol_val = (term_voltage - 4200) / 100;
 		else
 			vol_val = 0;
+
+		power_supply_put_battery_info(info->psy_usb, &bat_info);
 	}
 
 	/* Set charge termination current */