diff options
author | Fernando Guzman Lugo <x0095840@ti.com> | 2010-01-27 21:04:02 -0500 |
---|---|---|
committer | Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | 2010-08-04 08:50:15 -0400 |
commit | 9caae4d87ca0087edd6c02efd674f13fe0419ee9 (patch) | |
tree | a4664e175c65e7c161e58497c0e5170e10e72e61 | |
parent | 0e828e8c2bab6d30649447eea68686413c92d340 (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>
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 3 |
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) | |||
146 | 146 | ||
147 | msg = (mbox_msg_t)rq->special; | 147 | msg = (mbox_msg_t)rq->special; |
148 | blk_end_request_all(rq, 0); | 148 | blk_end_request_all(rq, 0); |
149 | mbox->rxq->callback((void *)msg); | 149 | if (mbox->rxq->callback) |
150 | mbox->rxq->callback((void *)msg); | ||
150 | } | 151 | } |
151 | } | 152 | } |
152 | 153 | ||