Currently on failure the value returned from kzalloc() is -1. It should return -ENOMEM.
Signed-off-by: Allen Pais <allen.l...@gmail.com> --- arch/x86/mm/kmmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c index afc47f5..eb74b8a 100644 --- a/arch/x86/mm/kmmio.c +++ b/arch/x86/mm/kmmio.c @@ -385,7 +385,7 @@ static int add_kmmio_fault_page(unsigned long addr) f = kzalloc(sizeof(*f), GFP_ATOMIC); if (!f) - return -1; + return -ENOMEM; f->count = 1; f->addr = addr; -- 2.7.4