]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/power/x86/intel-speed-select: Fix output when running on unsupported CLX platforms
authorZhang Rui <rui.zhang@intel.com>
Thu, 19 Mar 2026 05:52:56 +0000 (13:52 +0800)
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Sun, 5 Apr 2026 18:48:17 +0000 (11:48 -0700)
When running intel-speed-select on unsupported CLX platforms, it prints
 intel-speed-select: Invalid CPU model (85)
 : Success
Because this is not a system error and errno is not set.

Replace err() with exit().

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
tools/power/x86/intel-speed-select/isst-config.c

index 1e156063141e65bc0b85f3e7e856dcb9d50e6307..67878a08e11642dc12b68f06c594de8eb8180ead 100644 (file)
@@ -3250,8 +3250,10 @@ static void cmdline(int argc, char **argv)
        }
 
        ret = update_cpu_model();
-       if (ret)
-               err(-1, "Invalid CPU model (%d)\n", cpu_model);
+       if (ret) {
+               fprintf(stderr, "Invalid CPU model (%d)\n", cpu_model);
+               exit(1);
+       }
        printf("Intel(R) Speed Select Technology\n");
        printf("Executing on CPU model:%d[0x%x]\n", cpu_model, cpu_model);