power: supply: cpcap-charger: Fix missing power_supply_put()

Fix missing power_supply_put().

Cc: Arthur Demchenkov <spinal.by@gmail.com>
Cc: Carl Philipp Klemm <philipp@uvos.xyz>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Fixes: 5688ea0492 ("power: supply: cpcap-charger: Allow changing constant charge voltage")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Tony Lindgren 2021-01-10 21:53:49 +02:00 committed by Sebastian Reichel
parent c82a2fbe6c
commit 4bff91bb32

View File

@ -302,6 +302,7 @@ cpcap_charger_get_bat_const_charge_voltage(struct cpcap_charger_ddata *ddata)
if (!error)
voltage = prop.intval;
}
power_supply_put(battery);
return voltage;
}