diff options
Diffstat (limited to 'include/linux/err.h')
-rw-r--r-- | include/linux/err.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/err.h b/include/linux/err.h index ed563f2c4a..d743b4d092 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -1,9 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + #ifndef _LINUX_ERR_H #define _LINUX_ERR_H #include <linux/compiler.h> -#include <asm-generic/errno.h> +#include <linux/errno.h> /* * Kernel pointers have redundant information, so we can use a @@ -17,7 +19,7 @@ #ifndef __ASSEMBLY__ -#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) static inline void *ERR_PTR(long error) { |