diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-09-27 08:40:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-20 13:44:41 -0400 |
commit | f5ed4707944f0019bf80557f86a6173e9270a981 (patch) | |
tree | df478e7b948d7af4c4cc3b3b61e6963c941b8374 /drivers/gpu | |
parent | 1cb6d159e271cd10c7815dd5c08fbd520f83223f (diff) |
gpu: nvgpu: fix page alloc slab error condition
Return NULL instead of ERR_PTR from __gk20a_alloc_slab to be consistent
with __gk20a_alloc_pages, and thus to work with an error check in
gk20a_page_alloc in out-of-memory conditions.
Bug 1799159
JIRA DNVGPU-100
Change-Id: I8c3c0e121840758c6aba860baac86a38e873e359
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1227730
(cherry picked from commit 209927a6b3bae4fddc2a6a745c1b4b1f46c6675c)
Reviewed-on: http://git-master/r/1235192
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c index 358b657f..94d30abf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c | |||
@@ -378,7 +378,7 @@ static struct gk20a_page_alloc *__gk20a_alloc_slab( | |||
378 | fail: | 378 | fail: |
379 | kfree(alloc); | 379 | kfree(alloc); |
380 | kfree(chunk); | 380 | kfree(chunk); |
381 | return ERR_PTR(-ENOMEM); | 381 | return NULL; |
382 | } | 382 | } |
383 | 383 | ||
384 | static void __gk20a_free_slab(struct gk20a_page_allocator *a, | 384 | static void __gk20a_free_slab(struct gk20a_page_allocator *a, |