diff options
| author | 2010-02-28 23:55:20 -0800 | |
|---|---|---|
| committer | 2010-02-28 23:55:20 -0800 | |
| commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
| tree | 3336feaa61324486945816cb52c347733e7c0821 /include/linux/err.h | |
| parent | Input: winbond-cir - fix suspend/resume (diff) | |
| parent | Input: atkbd - release previously reserved keycodes 248 - 254 (diff) | |
| download | wireguard-linux-35858adbfca13678af99fb31618ef4428d6dedb0.tar.xz wireguard-linux-35858adbfca13678af99fb31618ef4428d6dedb0.zip | |
Merge branch 'next' into for-linus
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 ec87f3142bf3..1b12642636c7 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -34,6 +34,11 @@ static inline long IS_ERR(const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +static inline long 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. |
