Commit 361ecaad authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Andi Shyti

drm/i915: Fix an error handling path in igt_write_huge()

All error handling paths go to 'out', except this one. Be consistent and
also branch to 'out' here.

Fixes: c10a652e ("drm/i915/selftests: Rework context handling in hugepages selftests")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7a036b88671312ee9adc01c74ef5b3376f690b76.1689619758.git.christophe.jaillet@wanadoo.fr
parent d3f23ab9
...@@ -1246,8 +1246,10 @@ static int igt_write_huge(struct drm_i915_private *i915, ...@@ -1246,8 +1246,10 @@ static int igt_write_huge(struct drm_i915_private *i915,
* times in succession a possibility by enlarging the permutation array. * times in succession a possibility by enlarging the permutation array.
*/ */
order = i915_random_order(count * count, &prng); order = i915_random_order(count * count, &prng);
if (!order) if (!order) {
return -ENOMEM; err = -ENOMEM;
goto out;
}
max_page_size = rounddown_pow_of_two(obj->mm.page_sizes.sg); max_page_size = rounddown_pow_of_two(obj->mm.page_sizes.sg);
max = div_u64(max - size, max_page_size); max = div_u64(max - size, max_page_size);
......
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