提交 69e331b4 编写于 作者: I 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: NImre Deak <imre.deak@intel.com>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-3-imre.deak@intel.com
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册