History

staging: android: ion: Return an ERR_PTR in ion_map_kernel

The expected return value from ion_map_kernel is an ERR_PTR. The error path for a vmalloc failure currently just returns NULL, triggering a warning in ion_buffer_kmap_get. Encode the vmalloc failure as an ERR_PTR.

Laura Abbott committed 8 years ago

Commit 0a2bc001 parent 1376b0a1 file · +1 −1Browse files

Unified · Split

drivers/staging/android/ion/ion_heap.c+1−1
@@ -30,7 +30,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap, · 29 unmodified lines
3030 struct page **tmp = pages;
3131
3232 if (!pages)
33− return NULL;
33+ return ERR_PTR(-ENOMEM);
3434
3535 if (buffer->flags & ION_FLAG_CACHED)
3636 pgprot = PAGE_KERNEL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t