mirror of https://github.com/schoebel/mars
copy: remove superfluous checks
This commit is contained in:
parent
b93c899403
commit
c5204c605f
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue