Nov. 7, 2013
5:41 a.m.
In kernel source, `IS_ERR_VALUE` is defined: #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) It's usage can be realized literally, but definition is not. Can I use this macro to determines the kernel API's result is valid? Example: if (IS_ERR_VALUE(filp_open(device))) { filp_close(device); }