pmqos: Fix unreachable code when using pmqos_cancel() 06/314806/1
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 19 Jul 2024 09:47:54 +0000 (18:47 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 19 Jul 2024 09:47:54 +0000 (18:47 +0900)
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 <cw00.choi@samsung.com>
src/pmqos/pmqos.c

index 20fd04a2dbc0a3ece355fc45a43635d879b33f4b..246a1959bfe46421f387725fa30a351dcc51245b 100644 (file)
@@ -387,7 +387,7 @@ static int pmqos_cancel(const char *name)
        }
 
        if (!elem)
-               return 0;
+               return -EINVAL;
 
        set_pmqos(pmqos->name, false);