Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 265a2ac3 authored by Colin Cross's avatar Colin Cross Committed by Mitchel Humpherys
Browse files

ion: remove IS_ERR_OR_NULL



IS_ERR_OR_NULL is often part of a bad pattern that can accidentally
return 0 on error:
if (IS_ERR_OR_NULL(ptr))
    return PTR_ERR(ptr);

It also usually means that the errors of a function are not well
defined.  Replace all uses in ion.c by ensure that the return
type of any function in ion is an ERR_PTR.

Specify that the expected return value from map_kernel or map_dma
heap ops is ERR_PTR, and warn if a heap returns NULL.

Change-Id: I6e7ea0d2e62fa08d4e372a7ef6da649f7a62289c
Signed-off-by: default avatarColin Cross <ccross@android.com>
Git-commit: 16575fafc9bec633dcee963d0616baa576fdcabe
Git-repo: https://android.googlesource.com/kernel/common


[mitchelh@codeaurora.org: minor context fixup]
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 021a2842
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment