Message ID | 1446464924-20878-6-git-send-email-thomas.wood@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/benchmarks/gem_exec_reloc.c b/benchmarks/gem_exec_reloc.c index 5be482a..2ef6df5 100644 --- a/benchmarks/gem_exec_reloc.c +++ b/benchmarks/gem_exec_reloc.c @@ -249,8 +249,6 @@ int main(int argc, char **argv) case 'r': num_relocs = atoi(optarg); - if (num_relocs < 0) - num_relocs = 0; break; } } diff --git a/overlay/gem-interrupts.c b/overlay/gem-interrupts.c index 48a36b8..0150a1d 100644 --- a/overlay/gem-interrupts.c +++ b/overlay/gem-interrupts.c @@ -142,9 +142,12 @@ int gem_interrupts_update(struct gem_interrupts *irqs) return irqs->error; if (irqs->fd < 0) { - val = interrupts_read(); - if (val < 0) + long long ret; + ret = interrupts_read(); + if (ret < 0) return irqs->error = ENODEV; + else + val = ret; } else { if (read(irqs->fd, &val, sizeof(val)) < 0) return irqs->error = errno;
Signed-off-by: Thomas Wood <thomas.wood@intel.com> --- benchmarks/gem_exec_reloc.c | 2 -- overlay/gem-interrupts.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-)