提交 e91926e9 编写于 作者: A Anton Vorontsov

apm_power: check I.intval for zero value, we use it as the divisor

Signed-off-by: NAnton Vorontsov <cbou@mail.ru>
上级 ae4bb152
......@@ -133,6 +133,9 @@ static int do_calculate_time(int status, enum apm_source source)
return -1;
}
if (!I.intval)
return 0;
switch (source) {
case SOURCE_CHARGE:
full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册