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>
This commit is contained in:
Flavio Ceolin 2018-09-25 17:34:14 -07:00 committed by Anas Nashif
parent 78f27a81f5
commit 061a2c5b63

View file

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