Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;