Merge "ion: msm: Only check heap IDs if the heap has been initialized"

This commit is contained in:
qctecmdr 2019-09-09 17:48:06 -07:00 • committed by Gerrit - the friendly Code Review server
commit dea13806a5

View file

@ -411,7 +411,7 @@ struct ion_heap *get_ion_heap(int heap_id)
for (i = 0; i < num_heaps; i++) {
heap = heaps[i];
if (heap->id == heap_id)
if (heap && heap->id == heap_id)
return heap;
}