diff options
| author | David S. Miller <davem@davemloft.net> | 2010-01-05 02:33:22 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-01-05 02:33:22 +0300 |
| commit | 5958eed76ccc8c361f872829bdc4b8c6dc9cd379 (patch) | |
| tree | 8f8dfcced082db674b0ae3ca3af9fdb6dde59dae /include/linux/err.h | |
| parent | c7c17c2779075e675cb3c7fe2ecde67e226771fb (diff) | |
| parent | c5974b835a909ff15c3b7e6cf6789b5eb919f419 (diff) | |
| download | linux-5958eed76ccc8c361f872829bdc4b8c6dc9cd379.tar.xz | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
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. |
