x86/mm/kmmio: correctly handle kzalloc return
Subsystems (3)
PATCH 1/1 x86/mm/kmmio: correctly handle kzalloc return
Replacing return value -1 to error code
Signed-off-by Mugilraj Dhavachelvan <[email protected]>
--- arch/x86/mm/kmmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/kmmio.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
Pekka Paalanen
reviewerQuoted 12 lines · On Tue, 20 Oct 2020 14:13:44 +0530 Mugilraj Dhavachelvan…
Replacing return value -1 to error code
Signed-off-by Mugilraj Dhavachelvan <[email protected]>--- arch/x86/mm/kmmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/mm/kmmio.c +0
-0
arch/x86/mm/kmmio.c static int add_kmmio_fault_page(unsigned long addr) · line 392
Quoted 8 lines
arch/x86/mm/kmmio.c +1
-1@@ -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;
Hi,
did you even build-test this?
Why did you write this patch? What does it achieve?
Thanks,
pq