power: vm_bms: avoid a race condition in the calculate_reported_soc
When the charging is ended, the last_soc may be set to invalid for
a while. Add a check and do not calculate the reported soc if the
last_soc value is invalid.
Change-Id: Ia6987098dee5447c6852a276491930ddfbaa062e
CRs-Fixed: 848209
Signed-off-by:
Jie Cheng <rockiec@codeaurora.org>
Loading
Please register or sign in to comment