mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
Fix comparison of unsigned integers
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user