diff options
author | Imre Deak <imre.deak@intel.com> | 2021-03-26 00:47:45 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-03-29 22:54:50 +0300 |
commit | 69e331b44c9c45510f45f8a99c467eaa158f455d (patch) | |
tree | 87b08fc32b94c28ddce875d3c5fadbf84c1870ac /drivers/gpu/drm/i915/selftests/i915_vma.c | |
parent | cc41b0fddb8c2e790255981d140a5297a283be2a (diff) | |
download | linux-69e331b44c9c45510f45f8a99c467eaa158f455d.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_vma.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_vma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c index 1b6125e4c1ac..35481cfbb635 100644 --- a/drivers/gpu/drm/i915/selftests/i915_vma.c +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c @@ -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; } } |