summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/mailbox.c
diff options
context:
space:
mode:
authorFernando Guzman Lugo <x0095840@ti.com>2010-01-27 20:04:02 -0600
committerHiroshi DOYU <Hiroshi.DOYU@nokia.com>2010-08-04 15:50:15 +0300
commit9caae4d87ca0087edd6c02efd674f13fe0419ee9 (patch)
treea4664e175c65e7c161e58497c0e5170e10e72e61 /arch/arm/plat-omap/mailbox.c
parent0e828e8c2bab6d30649447eea68686413c92d340 (diff)
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>
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r--arch/arm/plat-omap/mailbox.c3
1 files changed, 2 insertions, 1 deletions
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);
}
}