[igt-dev] [PATCH i-g-t 15/21] igt_aux: Handle empty pm_test file gracefully
Petri Latvala
petri.latvala at intel.com
Wed Jan 16 11:20:44 UTC 2019
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Imre Deak <imre.deak at intel.com>
---
lib/igt_aux.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 1250d5c5..e9bf0728 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;
--
2.19.1
More information about the igt-dev
mailing list