samples/damon/mtier: do not stop first context for damon_start() failure

damon_start() was able to fail while keeping the first context running. 
mtier hence stops the first context in the case.  damon_start() is
refactored to avoid that.  The error handling is no longer necessary. 
Remove it.

Link: https://lore.kernel.org/20260706140628.87414-3-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
SJ Park
2026-07-30 19:48:08 -07:00
committed by Andrew Morton
parent 42809a1134
commit 358582eddd
-2
View File
@@ -193,8 +193,6 @@ static int damon_sample_mtier_start(void)
if (!err)
return 0;
if (damon_is_running(ctxs[0]))
damon_stop(ctxs, 1);
damon_destroy_ctx(ctxs[0]);
damon_destroy_ctx(ctxs[1]);
return err;