diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-12-23 14:04:07 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-02 18:30:40 +0300 |
commit | 9861b6682804a9db82600e0adf592bfa6deec377 (patch) | |
tree | 9f1867154943518e64cb24869d6c9d8db5eb553f /drivers/gpu/drm/i915/selftests/i915_random.c | |
parent | 85a9c0bc0888be8b140de06ae6486208bc1424f9 (diff) | |
download | linux-9861b6682804a9db82600e0adf592bfa6deec377.tar.xz |
drm/i915/selftests: Allow random array allocation to fail
In the selftests, we don't want to force an oom and would rather
ENOMEM be reported. In this case, we would rather the allocation for the
random array to fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171223110407.21402-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_random.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_random.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_random.c b/drivers/gpu/drm/i915/selftests/i915_random.c index 2088ae57aa89..1f415ce47018 100644 --- a/drivers/gpu/drm/i915/selftests/i915_random.c +++ b/drivers/gpu/drm/i915/selftests/i915_random.c @@ -57,7 +57,8 @@ unsigned int *i915_random_order(unsigned int count, struct rnd_state *state) { unsigned int *order, i; - order = kmalloc_array(count, sizeof(*order), GFP_KERNEL | __GFP_NOWARN); + order = kmalloc_array(count, sizeof(*order), + GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN); if (!order) return order; |