Commit fed4c726 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Richard Weinberger

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: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 523d939e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment