From c5204c605fe9e186ceea48b3ec7a4acd61c68d56 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 27 Jul 2022 10:06:29 +0200 Subject: [PATCH] copy: remove superfluous checks --- kernel/mars_copy.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/mars_copy.c b/kernel/mars_copy.c index ec7b5c7a..96a7a566 100644 --- a/kernel/mars_copy.c +++ b/kernel/mars_copy.c @@ -1169,10 +1169,6 @@ static int copy_brick_construct(struct copy_brick *brick) unsigned i; brick->st = brick_block_alloc(0, PAGE_SIZE); - if (unlikely(!brick->st)) { - MARS_ERR("cannot allocate state directory table.\n"); - return -ENOMEM; - } memset(brick->st, 0, PAGE_SIZE); for (i = 0; i < MAX_SUB_TABLES; i++) { @@ -1187,11 +1183,6 @@ static int copy_brick_construct(struct copy_brick *brick) sub_table = brick_block_alloc(0, PAGE_SIZE); brick->st[i] = sub_table; - if (unlikely(!sub_table)) { - MARS_ERR("cannot allocate state subtable %u\n", i); - _free_pages(brick); - return -ENOMEM; - } memset(sub_table, 0, PAGE_SIZE); }