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: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed