From abb2940c03d2972d2590cfc01ca76c262ca58cb4 Mon Sep 17 00:00:00 2001 From: Leonardo Carreras Date: Mon, 3 Feb 2025 17:54:23 +0000 Subject: [PATCH] Fix return value in TSC init Signed-off-by: Leonardo Carreras --- common/lib/tsc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lib/tsc.cpp b/common/lib/tsc.cpp index 587094462..e6196972c 100644 --- a/common/lib/tsc.cpp +++ b/common/lib/tsc.cpp @@ -52,7 +52,10 @@ int tsc_init(struct Tsc *t) { return ret; #endif #endif - return (int)(t->frequency); + if (t->frequency) + return 0; // Frequency determined with success + else + return -1; } uint64_t tsc_rate_to_cycles(struct Tsc *t, double rate) {