From: x0095840@ti.com (Fernando Guzman Lugo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Mailbox: Check valid registered callback before calling
Date: Wed, 27 Jan 2010 20:04:02 -0600 [thread overview]
Message-ID: <mailman.218.1266476943.2170.linux-arm-kernel@lists.infradead.org> (raw)
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>
---
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 3e2f961..8136ee3 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -144,7 +144,8 @@ static void mbox_rx_work(struct work_struct *work)
=20
msg =3D (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);
}
}
=20
--=20
1.6.0.4
reply other threads:[~2010-01-28 2:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mailman.218.1266476943.2170.linux-arm-kernel@lists.infradead.org \
--to=x0095840@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox