From f5ed4707944f0019bf80557f86a6173e9270a981 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 27 Sep 2016 15:40:55 +0300 Subject: 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 Reviewed-on: http://git-master/r/1227730 (cherry picked from commit 209927a6b3bae4fddc2a6a745c1b4b1f46c6675c) Reviewed-on: http://git-master/r/1235192 Reviewed-by: Alex Waterman Tested-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c') 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( fail: kfree(alloc); kfree(chunk); - return ERR_PTR(-ENOMEM); + return NULL; } static void __gk20a_free_slab(struct gk20a_page_allocator *a, -- cgit v1.2.2