power: pm8921-bms: Add error handling logic

Handle return code in reading vsense average so that
the parent function pm8921_bms_get_battery_current does not
report invalid battery current. While at it, also fix the
variable initialization.

CRs-Fixed: 389636
Change-Id: If24985f47cc9fcd6c2eb84a73165878559008120
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
1 file changed