projects
/
~tnikolova
/
compat
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compat: add IS_ERR_OR_NULL()
[~tnikolova/compat/.git]
/
include
/
linux
/
compat-2.6.33.h
diff --git
a/include/linux/compat-2.6.33.h
b/include/linux/compat-2.6.33.h
index
43f1989
..
386ee4c
100644
(file)
--- a/
include/linux/compat-2.6.33.h
+++ b/
include/linux/compat-2.6.33.h
@@
-144,6
+144,11
@@
static inline bool pci_is_pcie(struct pci_dev *dev)
#define __always_unused /* unimplemented */
#endif
#define __always_unused /* unimplemented */
#endif
+static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
+{
+ return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
#endif /* LINUX_26_33_COMPAT_H */
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
#endif /* LINUX_26_33_COMPAT_H */