commit | f7a960960c1aab98e6ff930ce93a21351a882306 | [log] [tgz] |
---|---|---|
author | Xiaozhe Shi <xiaozhes@codeaurora.org> | Fri Aug 16 16:55:06 2013 -0700 |
committer | Gerrit - the friendly Code Review server <code-review@localhost> | Fri Nov 01 18:57:22 2013 -0700 |
tree | ae317c9eb4cc9456172513560356eabfa0996366 | |
parent | c15d424a817685ba7626e795b53856036fa5172d [diff] |
of_batterydata: Fix possible divide by 0 conditions If the Battery ID is either short circuited or floating, the batterydata loading may cause a divide by 0 warning when calculating the Battery ID resistance. Fix this by checking for 0 denominators before doing the divisions and returning 0 kOhms for the Battery ID resistance. Change-Id: Ia631d8bdbdf6be838c7cfe2ea9601da9dea45636 Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>