Skip to content

Commit a32e6c5

Browse files
ahunter6acmel
authored andcommitted
perf intel-pt: Fix next 'err' value, walking trace
Code after label 'next:' in intel_pt_walk_trace() assumes 'err' is zero, but it may not be, if arrived at via a 'goto'. Ensure it is zero. Fixes: 7c1b16b ("perf intel-pt: Add support for decoding FUP/TIP only") Signed-off-by: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: [email protected] # v5.15+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent c79ee2b commit a32e6c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,6 +2942,7 @@ static int intel_pt_walk_trace(struct intel_pt_decoder *decoder)
29422942
if (err)
29432943
return err;
29442944
next:
2945+
err = 0;
29452946
if (decoder->cyc_threshold) {
29462947
if (decoder->sample_cyc && last_packet_type != INTEL_PT_CYC)
29472948
decoder->sample_cyc = false;

0 commit comments

Comments
 (0)