summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-25 11:55:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-08-25 12:00:05 +0100
commit14618620cc057293bce77f9a137a5f7df083beed (patch)
tree2ed15d17d44a8adc5262a6b201f46ab8ea860995 /tools
parentdb91f220da8806a505e848ab35db7659b155fe1f (diff)
decode: Handle errors during parsing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_error_decode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
index aaafae17..203268c0 100644
--- a/tools/intel_error_decode.c
+++ b/tools/intel_error_decode.c
@@ -231,23 +231,23 @@ read_data_file (const char * filename)
printf("%s", line);
matched = sscanf (line, "PCI ID: 0x%04x\n", &reg);
- if (matched)
+ if (matched == 1)
devid = reg;
matched = sscanf (line, " ACTHD: 0x%08x\n", &reg);
- if (matched)
+ if (matched == 1)
intel_decode_context_set_head_tail(reg, 0xffffffff);
matched = sscanf (line, " PGTBL_ER: 0x%08x\n", &reg);
- if (matched && reg)
+ if (matched == 1 && reg)
print_pgtbl_err(reg, devid);
matched = sscanf (line, " INSTDONE: 0x%08x\n", &reg);
- if (matched)
+ if (matched == 1)
print_instdone (devid, reg, -1);
matched = sscanf (line, " INSTDONE1: 0x%08x\n", &reg);
- if (matched)
+ if (matched == 1)
print_instdone (devid, -1, reg);
continue;