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: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-3-imre.deak@intel.com
This commit is contained in:
parent
cc41b0fddb
commit
69e331b44c
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user