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

Signed-off-by: Anton Vorontsov <cbou@mail.ru>
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 @@
 			return -1;
 	}
 
+	if (!I.intval)
+		return 0;
+
 	switch (source) {
 	case SOURCE_CHARGE:
 		full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;