power: supply: charger-manager: fix incorrect health status
authorJunlin Yang <yangjunlin@yulong.com>
Sat, 16 Jan 2021 11:41:20 +0000 (19:41 +0800)
committerSebastian Reichel <sre@kernel.org>
Sat, 16 Jan 2021 14:02:15 +0000 (15:02 +0100)
commit95b78d53706d3866c232e4f4819ad38a88f148d4
tree8ebc07bd4d09c9e83a9f62bc8d5318296942def9
parentb7e15bd0c17a37d6ab61dceb08ef683855e85635
power: supply: charger-manager: fix incorrect health status

cm->emergency_stop will only be the value in the enumeration,
and cannot be less than zero, it will get an exception value.
So replace it with the corresponding value.

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/charger-manager.c