projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm: add VM counters for transparent hugepages
[firefly-linux-kernel-4.4.55.git]
/
include
/
linux
/
err.h
diff --git
a/include/linux/err.h
b/include/linux/err.h
index 448afc12c78afe6157929010a7fba01a6d63ba8e..f2edce25a76b64f91701cdbd2c680dce19b90706 100644
(file)
--- a/
include/linux/err.h
+++ b/
include/linux/err.h
@@
-52,6
+52,14
@@
static inline void * __must_check ERR_CAST(const void *ptr)
return (void *) ptr;
}
+static inline int __must_check PTR_RET(const void *ptr)
+{
+ if (IS_ERR(ptr))
+ return PTR_ERR(ptr);
+ else
+ return 0;
+}
+
#endif
#endif /* _LINUX_ERR_H */