Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727941
| From | Allen Pais <allen.lkml@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails |
| Date | 2017-09-07 08:30 +0200 |
| Message-ID | <umYu5-4DP-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Currently on failure the value returned from kzalloc() is -1. It should return -ENOMEM. Signed-off-by: Allen Pais <allen.lkml@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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails Allen Pais <allen.lkml@gmail.com> - 2017-09-07 08:30 +0200
Re: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails Joe Perches <joe@perches.com> - 2017-09-07 08:40 +0200
Re: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails Allen <allen.lkml@gmail.com> - 2017-09-07 08:40 +0200
Re: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails Joe Perches <joe@perches.com> - 2017-09-07 08:50 +0200
Re: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails Allen <allen.lkml@gmail.com> - 2017-09-07 09:00 +0200
csiph-web