Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5585c88 authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: vm-bms: Initialize the intval variable



There is a possibility that the intval variable
is used in calculations without being initialized.

CRs-Fixed: 661874
Change-Id: I3d325c444c61609a2de32bb10c41946a39165cc2
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent 80a94be1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1680,6 +1680,8 @@ static int qpnp_vm_bms_power_get_property(struct power_supply *psy,
				struct qpnp_bms_chip, bms_psy);
	int value = 0, rc;

	val->intval = 0;

	switch (psp) {
	case POWER_SUPPLY_PROP_CAPACITY:
		val->intval = get_prop_bms_capacity(chip);