diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2016-05-28 18:39:03 +0530 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-08-04 00:00:06 +0200 |
commit | fed4c72689805001108f86868e5856edb3d3808a (patch) | |
tree | 34aacedc24c2eac77e898352f1f38bfddedf622b /arch/um | |
parent | 523d939ef98fd712632d93a5a2b588e477a7565e (diff) | |
download | lwn-fed4c72689805001108f86868e5856edb3d3808a.tar.gz lwn-fed4c72689805001108f86868e5856edb3d3808a.zip |
um: Eliminate null test after alloc_bootmem
alloc_bootmem function never returns NULL. Thus a NULL test after a
call to this function is unnecessary.
The Coccinelle semantic patch used to make this change is follows:
@@
expression E;
statement S;
@@
E =
alloc_bootmem(...)
... when != E
- if (E == NULL) S
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/initrd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c index 55cead809b18..48bae81f8dca 100644 --- a/arch/um/kernel/initrd.c +++ b/arch/um/kernel/initrd.c @@ -37,8 +37,6 @@ static int __init read_initrd(void) } area = alloc_bootmem(size); - if (area == NULL) - return 0; if (load_initrd(initrd, area, size) == -1) return 0; |