Mailbox: Check valid registered callback before calling
This patch checks if the mailbox user has assinged a valid callback fuction before calling it. Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
This commit is contained in:
parent
0e828e8c2b
commit
9caae4d87c
|
@ -146,7 +146,8 @@ static void mbox_rx_work(struct work_struct *work)
|
|||
|
||||
msg = (mbox_msg_t)rq->special;
|
||||
blk_end_request_all(rq, 0);
|
||||
mbox->rxq->callback((void *)msg);
|
||||
if (mbox->rxq->callback)
|
||||
mbox->rxq->callback((void *)msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue