public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm/kmmio: correctly handle kzalloc return
@ 2020-10-20  8:43 Mugilraj Dhavachelvan
  2020-10-20  9:34 ` Pekka Paalanen
  0 siblings, 1 reply; 2+ messages in thread
From: Mugilraj Dhavachelvan @ 2020-10-20  8:43 UTC (permalink / raw)
  Cc: dmugil2000, Steven Rostedt, Ingo Molnar, Karol Herbst,
	Pekka Paalanen, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
	Thomas Gleixner, Borislav Petkov, x86, H. Peter Anvin,
	linux-kernel, nouveau

Replacing return value -1 to error code

Signed-off-by: Mugilraj Dhavachelvan <dmugil2000@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 be020a7bc414..15430520c232 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -386,7 +386,7 @@ static int add_kmmio_fault_page(unsigned long addr)
 
 	f = kzalloc(sizeof(*f), GFP_ATOMIC);
 	if (!f)
-		return -1;
+		return -ENOMEN;
 
 	f->count = 1;
 	f->addr = addr;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-20  9:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20  8:43 [PATCH] x86/mm/kmmio: correctly handle kzalloc return Mugilraj Dhavachelvan
2020-10-20  9:34 ` Pekka Paalanen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox