fix unconditional return in getMaxMemoryClock

This commit is contained in:
Jussi Kuokkanen 2023-11-13 11:08:53 +02:00
parent 30b6d50916
commit ed4b7c3d9f

View File

@ -958,9 +958,10 @@ std::vector<TreeNode<DeviceNode>> getMaxMemoryClock(AMDGPUData data) {
// Per kernel documentation, if there's only one index for memory clock, it means maximum // Per kernel documentation, if there's only one index for memory clock, it means maximum
auto lines = pstateSectionLinesWithRead("OD_MCLK", data); auto lines = pstateSectionLinesWithRead("OD_MCLK", data);
if (lines.size() != 1 || lines.size() != 2) if (lines.size() != 1 && lines.size() != 2)
return {}; return {};
// Index refers to nth line after 'OD_MCLK'
auto index = (lines.size() == 1) ? 0 : 1; auto index = (lines.size() == 1) ? 0 : 1;
auto controllerRange = parsePstateRangeLineWithRead("MCLK", data); auto controllerRange = parsePstateRangeLineWithRead("MCLK", data);