summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-11-22 07:57:23 -0500
committerTom Rini <trini@konsulko.com>2016-11-22 07:57:23 -0500
commit081abb130944e0c6ef5c7e5743422b7b375526b9 (patch)
tree5a360f0b2741fbf719b18e57e2e8e84c504b7234 /include/linux
parentca39bd8ce13434160f298c398de3e2fb2aafc923 (diff)
parent1f3232d2a10e35f619e48f49d0d8549cf2efcaa8 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/err.h5
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.