kernel: mem_domain: remove redundant clearing of mem_partition fields
When a memory partition is removed, it is not required to clear the start and attr fields, since a free partition is only indicated by a zero size field. This commit removes the un-necessary clearing of start and attr fields. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
293247e879
commit
ccf813c22a
1 changed files with 1 additions and 2 deletions
|
@ -198,9 +198,8 @@ void k_mem_domain_remove_partition(struct k_mem_domain *domain,
|
|||
_arch_mem_domain_partition_remove(domain, p_idx);
|
||||
}
|
||||
|
||||
domain->partitions[p_idx].start = 0;
|
||||
/* A zero-sized partition denotes it's a free partition */
|
||||
domain->partitions[p_idx].size = 0;
|
||||
domain->partitions[p_idx].attr = 0;
|
||||
|
||||
domain->num_partitions--;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue