summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-01-16 01:58:10 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-16 20:17:24 +0100
commitdfffa587a6bcd84f2087f88e11600b0e8b0aa1ee (patch)
tree3c0eeb56c14545895b1562786c0739edf688aa9a /include
parentKconfig: remove HAVE_LATENCYTOP_SUPPORT (diff)
downloadlinux-dfffa587a6bcd84f2087f88e11600b0e8b0aa1ee.tar.xz
linux-dfffa587a6bcd84f2087f88e11600b0e8b0aa1ee.zip
err.h: add (missing) unlikely() to IS_ERR_OR_NULL()
IS_ERR_VALUE() already contains it and so we need to add this only to the !ptr check. That will allow users of IS_ERR_OR_NULL(), to not add this compiler flag. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/err.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/err.h b/include/linux/err.h
index a729120644d5..56762ab41713 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -37,7 +37,7 @@ static inline bool __must_check IS_ERR(__force const void *ptr)
static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
{
- return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+ return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
}
/**