Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e91926e9ea9073d8ce95b74602e8c2d775f5a793
Commit:     e91926e9ea9073d8ce95b74602e8c2d775f5a793
Parent:     ae4bb152901e406074ae2a205e1c42941a46bbaf
Author:     Anton Vorontsov <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 13 02:44:54 2008 +0300
Committer:  Anton Vorontsov <[EMAIL PROTECTED]>
CommitDate: Sat Feb 2 02:44:34 2008 +0300

    apm_power: check I.intval for zero value, we use it as the divisor
    
    Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
---
 drivers/power/apm_power.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c
index a832a9a..a489227 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to