From 77484ab6cf5ed15b76122bad0301919bfd214bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 16 Jan 2024 05:53:47 -0800 Subject: [PATCH] intel/tools/error_decode: Simply error message handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the code path without arguments it tries 3 different paths and error messages are overwritten one by other, in this case any of those error messages are irrelevant. For the code path with arguments is similar, as it already have a fprintf(stderr) in the caller of open_error_state_file(). Reviewed-by: Lionel Landwerlin Signed-off-by: José Roberto de Souza Part-of: --- src/intel/tools/aubinator_error_decode.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c index af6958e9bf7..d66eafef74d 100644 --- a/src/intel/tools/aubinator_error_decode.c +++ b/src/intel/tools/aubinator_error_decode.c @@ -861,17 +861,8 @@ open_error_state_file(const char *path) break; } } - if (!file) { - fprintf(stderr, "Failed to find i915_error_state beneath %s\n", - path); - exit(EXIT_FAILURE); - } } else { file = fopen(path, "r"); - if (!file) { - fprintf(stderr, "Failed to open %s: %s\n", path, strerror(errno)); - exit(EXIT_FAILURE); - } } return file;