diff options
| author | Tom Rini <trini@konsulko.com> | 2016-11-22 07:57:23 -0500 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2016-11-22 07:57:23 -0500 |
| commit | 081abb130944e0c6ef5c7e5743422b7b375526b9 (patch) | |
| tree | 5a360f0b2741fbf719b18e57e2e8e84c504b7234 /include/linux/err.h | |
| parent | ca39bd8ce13434160f298c398de3e2fb2aafc923 (diff) | |
| parent | 1f3232d2a10e35f619e48f49d0d8549cf2efcaa8 (diff) | |
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'include/linux/err.h')
| -rw-r--r-- | include/linux/err.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/err.h b/include/linux/err.h index e4d22d508c..22e5756edd 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -36,6 +36,11 @@ static inline long IS_ERR(const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +static inline bool IS_ERR_OR_NULL(const void *ptr) +{ + return !ptr || IS_ERR_VALUE((unsigned long)ptr); +} + /** * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type * @ptr: The pointer to cast. |
