1 /* SPDX-License-Identifier: GPL-2.0 */
6 #define IS_ERR_VALUE(x) (unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO
8 static inline int IS_ERR_OR_NULL(const void *ptr)
10 return !ptr || IS_ERR_VALUE((unsigned long)ptr);
13 static inline long PTR_ERR(const void *ptr)
18 #endif /* __ERR_H__ */