pass: thermal: Fix issue during stop PASS daemon 39/178439/1 accepted/tizen/unified/20180510.134400 submit/tizen/20180510.070432
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 10 May 2018 05:06:50 +0000 (14:06 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 10 May 2018 05:06:50 +0000 (14:06 +0900)
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 <cw00.choi@samsung.com>
src/pass/pass-thermal.c

index 4de164b1b6628ad1cc8eccdc62ffb97b73c9b5f6..290950b307cdb716915ba5f6dbd25d4da127bb0b 100644 (file)
@@ -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) {