summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/thermal/intel/workload_hint
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/thermal/intel/workload_hint')
-rw-r--r--tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
index ba58589a1145..ca2bd03154e4 100644
--- a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
+++ b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
@@ -144,6 +144,8 @@ int main(int argc, char **argv)
ret = sscanf(index_str, "%d", &index);
if (ret < 0)
break;
+
+ index &= 0x0f;
if (index > WORKLOAD_TYPE_MAX_INDEX)
printf("Invalid workload type index\n");
else