ANDROID: ion_dummy_driver: Use IS_ERR_OR_NULL() before destroying heaps
Previously ion_heap_create() would return only NULL,
then ion_heap_destroy() would ignore null values safely.
But recently ion_heap_create() was changed to potentially
return an ERR_PTR() value, which can cause crashes when
ion_heap_destroy() is called on it.
Thus, check IS_ERR_OR_NULL() before calling ion_heap_destroy()
Signed-off-by:
John Stultz <john.stultz@linaro.org>
Change-Id: I8477961cded562ba4b1b2e2a30622e23a492cf58
Loading
Please register or sign in to comment