From ed4b7c3d9f7dd4d36ae812a385e4cc4077569498 Mon Sep 17 00:00:00 2001 From: Jussi Kuokkanen Date: Mon, 13 Nov 2023 11:08:53 +0200 Subject: [PATCH] fix unconditional return in getMaxMemoryClock --- src/plugins/AMD.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/AMD.cpp b/src/plugins/AMD.cpp index 028f38a..4e4c40c 100644 --- a/src/plugins/AMD.cpp +++ b/src/plugins/AMD.cpp @@ -958,9 +958,10 @@ std::vector> getMaxMemoryClock(AMDGPUData data) { // Per kernel documentation, if there's only one index for memory clock, it means maximum auto lines = pstateSectionLinesWithRead("OD_MCLK", data); - if (lines.size() != 1 || lines.size() != 2) + if (lines.size() != 1 && lines.size() != 2) return {}; + // Index refers to nth line after 'OD_MCLK' auto index = (lines.size() == 1) ? 0 : 1; auto controllerRange = parsePstateRangeLineWithRead("MCLK", data);