From: Hauke Mehrtens Date: Wed, 7 Aug 2013 22:53:20 +0000 (+0200) Subject: backports: backport PTR_ERR_OR_ZERO X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c9571a6888896213c7c9e6fa3ed3d6d9d132f889;p=openwrt%2Fstaging%2Fblogic.git backports: backport PTR_ERR_OR_ZERO This backports this patch: commit 6e8b8726ad503214ba66e34aed69aff41de33489 Author: Rusty Russell Date: Mon Jul 15 11:19:32 2013 +0930 PTR_RET is now PTR_ERR_OR_ZERO Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- diff --git a/backport/backport-include/linux/err.h b/backport/backport-include/linux/err.h index f62e3bf4241f..5583c2f3be2e 100644 --- a/backport/backport-include/linux/err.h +++ b/backport/backport-include/linux/err.h @@ -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 */