[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1360645032-9668-13-git-send-email-s-anna@ti.com>
Date: Mon, 11 Feb 2013 22:57:11 -0600
From: Suman Anna <s-anna@...com>
To: Greg Kroah-Hartman <greg@...uxfoundation.org>
CC: Linus Walleij <linus.walleij@...aro.org>,
Russell King <linux@....linux.org.uk>,
Tony Lindgren <tony@...mide.com>,
Arnd Bergmann <arnd@...db.de>,
Ohad Ben-Cohen <ohad@...ery.com>,
Paul Walmsley <paul@...an.com>,
Benoit Cousson <b-cousson@...com>,
Loic Pallardy <loic.pallardy@...com>,
Omar Ramirez Luna <omar.ramirez@...itl.com>,
<linux-omap@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Janusz Krzysztofik <jkrzyszt@....icnet.pl>,
Dom Cobley <popcornmix@...il.com>,
Wim Van Sebroeck <wim@...ana.be>,
Felipe Contreras <felipe.contreras@...ia.com>,
Tejun Heo <tj@...nel.org>,
Omar Ramirez Luna <omar.luna@...aro.org>,
Suman Anna <s-anna@...com>,
Fernando Guzman Lugo <lugo.fernando@...il.com>
Subject: [PATCH v2 12/13] mailbox: check for NULL nb in mailbox_put
The mailbox_put function must check the notifier block for
NULL before trying to unregister it.
Signed-off-by: Fernando Guzman Lugo <lugo.fernando@...il.com>
Signed-off-by: Suman Anna <s-anna@...com>
---
drivers/mailbox/mailbox.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index eaaf87e..c38241a 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -473,7 +473,8 @@ EXPORT_SYMBOL(mailbox_get);
void mailbox_put(struct mailbox *mbox, struct notifier_block *nb)
{
- blocking_notifier_chain_unregister(&mbox->notifier, nb);
+ if (nb)
+ blocking_notifier_chain_unregister(&mbox->notifier, nb);
mailbox_fini(mbox);
}
EXPORT_SYMBOL(mailbox_put);
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists