copy: remove superfluous checks

This commit is contained in:
Thomas Schoebel-Theuer 2022-07-27 10:06:29 +02:00
parent b93c899403
commit c5204c605f
1 changed files with 0 additions and 9 deletions

View File

@ -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);
}