Messages queue can be cleaned up by message callbacks, to avoid premature
removal of current message it should be removed from the queue before calling
these callbacks.
Change-Id: Ie95c291d27a1be52291cc2cd1b7dead8f24560b4
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
ctx->mt_state = MT_STATE_READY;
msg = list_first_entry(&ctx->mt_queue, struct sii8620_mt_msg,
node);
+ list_del(&msg->node);
if (msg->recv)
msg->recv(ctx, msg);
if (msg->continuation)
msg->continuation(ctx, msg->ret);
- list_del(&msg->node);
kfree(msg);
}