linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/7] omap: mailbox: check for NULL nb in mailbox_put
@ 2013-06-08  1:57 Suman Anna
  2013-06-08 18:46 ` Russ Dill
  0 siblings, 1 reply; 3+ messages in thread
From: Suman Anna @ 2013-06-08  1:57 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Jassi Brar, Loic Pallardy,
	linux-omap, linux-arm-kernel, Suman Anna, Fernando Guzman Lugo

The mailbox_put function must check the notifier block for
NULL before trying to unregister it.

Signed-off-by: Fernando Guzman Lugo <lugo.fernando@gmail.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 arch/arm/plat-omap/mailbox.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 42377ef..5fb4027 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -356,7 +356,8 @@ EXPORT_SYMBOL(omap_mbox_get);
 
 void omap_mbox_put(struct omap_mbox *mbox, struct notifier_block *nb)
 {
-	blocking_notifier_chain_unregister(&mbox->notifier, nb);
+	if (nb)
+		blocking_notifier_chain_unregister(&mbox->notifier, nb);
 	omap_mbox_fini(mbox);
 }
 EXPORT_SYMBOL(omap_mbox_put);
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-10 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08  1:57 [PATCH 2/7] omap: mailbox: check for NULL nb in mailbox_put Suman Anna
2013-06-08 18:46 ` Russ Dill
2013-06-10 17:38   ` Suman Anna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).