power: qpnp-bms: qpnp-charger: prevent loading null batterydata
Currently, the BMS and Charger tries to load battery properties from
the devicetree battery data node. However, currently the drivers only
check for a non-negative number before loading the properties. This
can cause null batterydata nodes to be loaded as 0s for all
properties.
Fix this by first intializing the properties to -1 before loading the
batterydata.
CRs-Fixed: 518407
Change-Id: Iede14a6ba5dd0d307a1bdd8f813c509f718acfe6
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment