From: Fernando Guzman Lugo Date: Thu, 28 Jan 2010 02:04:02 +0000 (-0600) Subject: Mailbox: Check valid registered callback before calling X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9caae4d87ca0087edd6c02efd674f13fe0419ee9;p=deliverable%2Flinux.git 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 Signed-off-by: Hiroshi DOYU --- diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 77c23f5a0037..72efbe5be578 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -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); } }