From 74b4e550cbf70b56db601317cc4b770274129282 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Thu, 13 Jun 2024 01:35:53 +0800 Subject: [PATCH] tests/checkasm: Remove check on linux perf fd in uninit The check should be >= 0, not > 0. The check itself is redundant since uninit only being called after init is success. Signed-off-by: Zhao Zhili --- tests/checkasm/checkasm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 56232ab1e0..b88b128e4c 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -823,8 +823,7 @@ static int bench_init(void) static void bench_uninit(void) { #if CONFIG_LINUX_PERF - if (state.sysfd > 0) - close(state.sysfd); + close(state.sysfd); #endif }