diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-10-12 20:05:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-10-12 20:05:58 +0100 |
commit | 836f8812f0e6c44674c1c75501640eabbdd8918a (patch) | |
tree | f41f9eefd1fb6c1627484c3747265e546e0010e5 | |
parent | 9375266293446922b02c6137360e82b72c7c6495 (diff) |
lib: Initialise 'wedged' in case of debugfs fail
If the debugfs dir cannot be found, the read/write of wedged status will
fail and leave the local variable unset. Give it a value to ensure a
consistent result.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-rw-r--r-- | lib/igt_gt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 3e5eb47db..8213526fc 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -368,6 +368,7 @@ void igt_force_gpu_reset(int drm_fd) dir = igt_debugfs_dir(drm_fd); + wedged = 0; igt_sysfs_set(dir, "i915_wedged", "-1"); igt_sysfs_scanf(dir, "i915_wedged", "%d", &wedged); |