@@ -48,7 +48,8 @@ static RAW_NOTIFIER_HEAD(xen_resume_notifier);
void xen_resume_notifier_register(struct notifier_block *nb)
{
- raw_notifier_chain_register(&xen_resume_notifier, nb);
+ if (raw_notifier_chain_register(&xen_resume_notifier, nb))
+ pr_warn("Xen resume notifier already registered\n");
}
EXPORT_SYMBOL_GPL(xen_resume_notifier_register);
@@ -731,10 +731,12 @@ int register_xenstore_notifier(struct notifier_block *nb)
{
int ret = 0;
- if (xenstored_ready > 0)
+ if (xenstored_ready > 0) {
ret = nb->notifier_call(nb, 0, NULL);
- else
- blocking_notifier_chain_register(&xenstore_chain, nb);
+ } else {
+ if (blocking_notifier_chain_register(&xenstore_chain, nb))
+ pr_warn("Xenstore notifier already registered\n");
+ }
return ret;
}