X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fpower%2Fapm_power.c;h=a4892275659dc02ffb1d12b85d0774a86bda8b08;hb=537388bb6563bfde7c0307b95ecc1f7a1ae39b02;hp=a832a9a05c66e8f469340978c52ad4db36c2ce08;hpb=dffd28a13a439e672c735d3fc87844d28cbacc65;p=linux-2.6 diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c index a832a9a05c..a489227565 100644 --- a/drivers/power/apm_power.c +++ b/drivers/power/apm_power.c @@ -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;