summaryrefslogtreecommitdiffstats
path: root/tools/include/linux/err.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2017-08-10 09:05:53 -0700
committerTony Lindgren <tony@atomide.com>2017-08-10 09:05:53 -0700
commitc002c27874faaa170b535d03d7efee89ecdd9be4 (patch)
tree70d91eba77a9c374e4f0bf9eb8636acba57ca173 /tools/include/linux/err.h
parent866b5e447f1ad3a0d72c139fabe3dd71f351f361 (diff)
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
downloadcachepc-linux-c002c27874faaa170b535d03d7efee89ecdd9be4.tar.gz
cachepc-linux-c002c27874faaa170b535d03d7efee89ecdd9be4.zip
Merge tag 'v4.13-rc1' into omap-for-v4.14/mmc-regulator
Linux v4.13-rc1
Diffstat (limited to 'tools/include/linux/err.h')
-rw-r--r--tools/include/linux/err.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
index bdc3dd8131d4..abf0478a8fb2 100644
--- a/tools/include/linux/err.h
+++ b/tools/include/linux/err.h
@@ -46,4 +46,9 @@ static inline bool __must_check IS_ERR(__force const void *ptr)
return IS_ERR_VALUE((unsigned long)ptr);
}
+static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
+{
+ return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
+}
+
#endif /* _LINUX_ERR_H */