power: qpnp-bms: clamp for SOC <= 0

In some scenarios a negative soc may be calculated even
though VBAT is above the cutoff voltage.

The clamping function does not take negative SOC values
into account and fails to clamp the SOC. Fix this
by checking for SOC values <= 0.

CRs-Fixed: 623091
Change-Id: I8d64b3c8717e8088be71d84d66225512b85e87e3
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
1 file changed