power: bcl: Fix possible divide by zero case not accounted correctly
If targets operate without battery, rbat value from bms/battery module
is undefined. Some targets rbat value for this scenario goes very low
and bcl treat this value as zero which is leading to divide by zero
issue during IAVAIL calculation. Fix this possible divide by zero case
by checking rbat properly before IAVAIL calculation.
Change-Id: I50da088d123e37c670054afc77559a71cc0a9382
Signed-off-by:
Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Loading
Please register or sign in to comment