summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_aux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 2e2d552b..ff98d91d 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -718,6 +718,9 @@ static enum igt_suspend_test get_suspend_test(int power_dir)
break;
}
+ if (!test_name)
+ return SUSPEND_TEST_NONE;
+
for (test = SUSPEND_TEST_NONE; test < SUSPEND_TEST_NUM; test++)
if (strcmp(suspend_test_name[test], test_name) == 0)
break;