Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727948
| From | Allen <allen.lkml@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] x86:mm:return -ENOMEM if kzalloc() fails |
| Date | 2017-09-07 08:40 +0200 |
| Message-ID | <umYDM-4Hq-13@gated-at.bofh.it> (permalink) |
| References | <umYu5-4DP-1@gated-at.bofh.it> <umYDM-4Hq-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> On Thu, 2017-09-07 at 11:56 +0530, Allen Pais wrote:
>> Currently on failure the value returned from kzalloc() is -1.
>> It should return -ENOMEM.
>>
>
> Looks like there are quite a few of these:
> (probably several false positives too)
The list is long. If the maintainers are okay with these clean-ups,
i'll go ahead and get all of them done.
- Allen
> $ git grep -A3 alloc.*GFP|grep -B3 -P "return\s+\-\d+"
> arch/powerpc/platforms/cell/spider-pci.c: dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL);
> arch/powerpc/platforms/cell/spider-pci.c- if (!dummy_page_va) {
> arch/powerpc/platforms/cell/spider-pci.c- pr_err("SPIDERPCI-IOWA:Alloc dummy_page_va failed.\n");
> arch/powerpc/platforms/cell/spider-pci.c- return -1;
> --
> --
Back to linux.kernel | Previous | Next — Previous in thread | 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