From: Ralf Baechle Date: Sat, 1 Jul 2006 11:36:25 +0000 (-0700) Subject: [PATCH] Fix IS_ERR Threshold Value X-Git-Tag: v2.6.18-rc1~203 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa79837d5b562766a3e3cfad4753a3df8e0a1319;p=linux-2.6 [PATCH] Fix IS_ERR Threshold Value o Raise the maximum error number in IS_ERR_VALUE to 4095. o Make that number available as a new constant MAX_ERRNO. Signed-off-by: Ralf Baechle Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/err.h b/include/linux/err.h index ff71d2af5d..cd3b367f74 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -13,7 +13,9 @@ * This should be a per-architecture thing, to allow different * error and pointer decisions. */ -#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) +#define MAX_ERRNO 4095 + +#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) static inline void *ERR_PTR(long error) {