backports: backport PTR_ERR_OR_ZERO
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 7 Aug 2013 22:53:20 +0000 (00:53 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 13 Aug 2013 01:12:03 +0000 (18:12 -0700)
This backports this patch:
commit 6e8b8726ad503214ba66e34aed69aff41de33489
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Mon Jul 15 11:19:32 2013 +0930

    PTR_RET is now PTR_ERR_OR_ZERO

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/backport-include/linux/err.h

index f62e3bf4241f796856de3600b1a1f93512a6cb8e..5583c2f3be2e8f1f9febf39441c9e3d63222c621 100644 (file)
@@ -23,4 +23,8 @@ static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
 }
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+#define PTR_ERR_OR_ZERO(p) PTR_RET(p)
+#endif
+
 #endif /* __BACKPORT_LINUX_ERR_H */