It won't just work in the kernel.
What it does is the following:
1) The ENOMEM defines and friends get positive values.
2) Then you have to link against the error mapper lib which replaces POSIX
functions with ones that return positive error codes, or set errno to a
positive value.
All you get is 1) which might have consequences you don't want. You cannot
use 2) in the kernel, since this would likely break the whole thing.
You'll have to patch your code.