From 65649d0df6f3af5f5ebc8bfd118ccd9b1f97bf3e Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Fri, 19 Jul 2024 18:47:54 +0900 Subject: [PATCH] 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 --- src/pmqos/pmqos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.34.1