kernel: Ignore _abort_timeout return

Ignoring the return of _abort_timeout when there is nothing to
do. Either because the condition to return something different from 0
was prior checked or because it was called during come cleanup.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-11 19:44:28 -07:00 committed by Anas Nashif
parent 1663ca8590
commit 4d5397bb0a
2 changed files with 2 additions and 5 deletions

View file

@ -122,10 +122,7 @@ void _impl_k_timer_start(struct k_timer *timer, s32_t duration, s32_t period)
unsigned int key = irq_lock();
if (timer->timeout.delta_ticks_from_prev != _INACTIVE) {
_abort_timeout(&timer->timeout);
}
(void)_abort_timeout(&timer->timeout);
timer->period = period_in_ticks;
timer->status = 0;
_add_timeout(NULL, &timer->timeout, &timer->wait_q, duration_in_ticks);

View file

@ -131,7 +131,7 @@ int k_delayed_work_cancel(struct k_delayed_work *work)
return -EINVAL;
}
} else {
_abort_timeout(&work->timeout);
(void)_abort_timeout(&work->timeout);
}
/* Detach from workqueue */