Browse Source

kernel: mempool: Remove unnecessary condition check

Removing an unnecessary check in k_mem_pool_alloc. The condition is
already being checked in the if.

MISRA-C rule 14.3

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
pull/10275/head
Flavio Ceolin 7 years ago committed by Anas Nashif
parent
commit
061a2c5b63
  1. 2
      kernel/mempool.c

2
kernel/mempool.c

@ -88,7 +88,7 @@ int k_mem_pool_alloc(struct k_mem_pool *p, struct k_mem_block *block, @@ -88,7 +88,7 @@ int k_mem_pool_alloc(struct k_mem_pool *p, struct k_mem_block *block,
block->id.block = block_num;
if (ret == 0 || timeout == K_NO_WAIT ||
(ret && ret != -ENOMEM)) {
ret != -ENOMEM) {
return ret;
}

Loading…
Cancel
Save