[PATCH] tools/perf:Remove unnecessary assignment

From: Zhu Jun
Date: Tue Aug 20 2024 - 03:02:36 EST


In the function cs_etm_decoder__init_def_logger_printing(),
the correct logic should be to return within the function
when ret is not equal to 0.

Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
index e917985bbbe6..dc80576180d5 100644
--- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
@@ -238,6 +238,7 @@ cs_etm_decoder__init_def_logger_printing(struct cs_etm_decoder_params *d_params,
cs_etm_decoder__print_str_cb);
if (ret != 0)
ret = -1;
+ return -1;

return 0;
}
--
2.17.1