From cf2cceefd6c8695283178dd09451c1f22b8f95f7 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 10 May 2018 14:06:50 +0900 Subject: [PATCH] pass: thermal: Fix issue during stop PASS daemon thermal->state indicates the "thermal_support" property in the configuration. If user doesn't want to use thermal monitor with "thermal_support=no", thermal->state is 0 (PASS_OFF). It is not error when thermal->state is zero. Just return zero value instead of error. Change-Id: I04f76774afb3b811d56dc0ebfb3f0888541e649f Signed-off-by: Chanwoo Choi --- src/pass/pass-thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pass/pass-thermal.c b/src/pass/pass-thermal.c index 4de164b..290950b 100644 --- a/src/pass/pass-thermal.c +++ b/src/pass/pass-thermal.c @@ -165,7 +165,7 @@ int pass_thermal_exit(struct pass_resource *res) if (!res) return -EINVAL; if (res->thermal.state != PASS_ON) - return -EINVAL; + return 0; ret = pass_resmon_unregister_uevent(res, RESMON_SRC_THERMAL); if (ret < 0) { -- 2.7.4