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>
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);