diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index 6fcebe441552..0d28741b8ecb 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -723,9 +723,9 @@ static int charger_get_property(struct power_supply *psy, val->intval = cm->battery_status; break; case POWER_SUPPLY_PROP_HEALTH: - if (cm->emergency_stop > 0) + if (cm->emergency_stop == CM_BATT_OVERHEAT) val->intval = POWER_SUPPLY_HEALTH_OVERHEAT; - else if (cm->emergency_stop < 0) + else if (cm->emergency_stop == CM_BATT_COLD) val->intval = POWER_SUPPLY_HEALTH_COLD; else val->intval = POWER_SUPPLY_HEALTH_GOOD;