Skip to contentSkip to conversation

x86: return proper error code

PATCH Superseded Davidlohr Bueso 1 participant 1 message Sep 24, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: return proper error code

x86: return -ENOMEM instead of -1 when returning on memory allocation errors in add_kmmio_fault_page()

---
 arch/x86/mm/kmmio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/kmmio.c +1 -1
index e5d5e2c..36a4347 100644
@@ -370,7 +370,7 @@ static int add_kmmio_fault_page(unsigned long page)
 
 	f = kzalloc(sizeof(*f), GFP_ATOMIC);
 	if (!f)
-		return -1;
+		return -ENOMEM;
 
 	f->count = 1;
 	f->page = page;
Signature · 1 line
1.7.0.4