Commit 69e331b4 authored by Imre Deak's avatar Imre Deak

drm/i915/selftest: Fix error handling in igt_vma_remapped_gtt()

An inner scope version of err shadows the variable in the outer scope,
and err doesn't get set after a failure, fix these.
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-3-imre.deak@intel.com
parent cc41b0fd
......@@ -890,7 +890,6 @@ static int igt_vma_remapped_gtt(void *arg)
struct i915_vma *vma;
u32 __iomem *map;
unsigned int x, y;
int err;
i915_gem_object_lock(obj, NULL);
err = i915_gem_object_set_to_gtt_domain(obj, true);
......@@ -962,6 +961,7 @@ static int igt_vma_remapped_gtt(void *arg)
*t == I915_GGTT_VIEW_ROTATED ? "Rotated" : "Remapped",
val, exp);
i915_vma_unpin_iomap(vma);
err = -EINVAL;
goto out;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment