diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-12-17 12:27:22 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-12-17 12:27:22 +0100 |
| commit | 67cbf8a216259dceefe570f6dc14746f43b2e627 (patch) | |
| tree | 1eca0b9922dee01b4d00dc0713b7ff434dddd44c /include/linux/err.h | |
| parent | 6c941c8556dd9269be621cd8159fc60e955a91b3 (diff) | |
| parent | 2fbe74b90bafebce615466b4c20f96b0465df1ae (diff) | |
Merge branch 'fix/misc' into topic/misc
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. |
