Messages should not be handled in error and busy state. Also state should
be update on success.
Change-Id: Ib6ac51f920cb44f75628cbec78b3bb32774816ff
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
{
struct sii8620_mt_msg *msg;
- if (list_empty(&ctx->mt_queue))
+ if (ctx->error)
+ return;
+ if (ctx->mt_state == MT_STATE_BUSY || list_empty(&ctx->mt_queue))
return;
if (ctx->mt_state == MT_STATE_DONE) {
+ ctx->mt_state = MT_STATE_READY;
msg = list_first_entry(&ctx->mt_queue, struct sii8620_mt_msg,
node);
if (msg->recv)