Commit bbae8831 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: pm8921-bms: add protection against divide by zero



There is a unprotected divide by zero in the driver- when full charge
capacity of the battery and unusable charge of the battery are calculated
equal.

In such a case set state of charge to 0% without the actual division.

Change-Id: I57f3333e780396de29435d29c30e54940c657d4e
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 08e7e0a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment