From b89435df392de5e06e0ee13778ddb0ac7fcb2e72 Mon Sep 17 00:00:00 2001 From: Phil Carmody Date: Mon, 14 Dec 2009 18:00:29 -0800 Subject: [PATCH] --- yaml --- r: 176344 b: refs/heads/master c: 603c4ba96be998a8dd7a6f9b23681c49acdf4b64 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/err.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4a025edaf524..b94bda737223 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9385565e20c4acf97cd8e2fd7155750e578edcc4 +refs/heads/master: 603c4ba96be998a8dd7a6f9b23681c49acdf4b64 diff --git a/trunk/include/linux/err.h b/trunk/include/linux/err.h index ec87f3142bf3..1b12642636c7 100644 --- a/trunk/include/linux/err.h +++ b/trunk/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.