Skip to content

Commit e2569b7

Browse files
Julia Lawallaegl
authored andcommitted
[IA64] Eliminate NULL test after alloc_bootmem in iosapic_alloc_rte()
As noted by Akinobu Mita alloc_bootmem and related functions never return NULL and always return a zeroed region of memory. Thus a NULL test or memset after calls to these functions is unnecessary. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Tony Luck <tony.luck@intel.com>
1 parent 8097110 commit e2569b7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/ia64/kernel/iosapic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,6 @@ static struct iosapic_rte_info * __init_refok iosapic_alloc_rte (void)
558558
if (!iosapic_kmalloc_ok && list_empty(&free_rte_list)) {
559559
rte = alloc_bootmem(sizeof(struct iosapic_rte_info) *
560560
NR_PREALLOCATE_RTE_ENTRIES);
561-
if (!rte)
562-
return NULL;
563561
for (i = 0; i < NR_PREALLOCATE_RTE_ENTRIES; i++, rte++)
564562
list_add(&rte->rte_list, &free_rte_list);
565563
}

0 commit comments

Comments
 (0)