From: Chanwoo Choi Date: Fri, 19 Jul 2024 09:47:54 +0000 (+0900) Subject: pmqos: Fix unreachable code when using pmqos_cancel() X-Git-Tag: accepted/tizen/unified/20240722.104306~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F314806%2F1;p=platform%2Fcore%2Fsystem%2Fpass.git pmqos: Fix unreachable code when using pmqos_cancel() Fix unreachable code when using pmqos_cancel() by returning the error code if failed. Before this patch, the usage code of pmqos_cancel() is not able to receive the any error code. Change-Id: Icc1d622f30c67d0552be0a530666912b9b15e678 Signed-off-by: Chanwoo Choi --- diff --git a/src/pmqos/pmqos.c b/src/pmqos/pmqos.c index 20fd04a..246a195 100644 --- a/src/pmqos/pmqos.c +++ b/src/pmqos/pmqos.c @@ -387,7 +387,7 @@ static int pmqos_cancel(const char *name) } if (!elem) - return 0; + return -EINVAL; set_pmqos(pmqos->name, false);