@@ -390,7 +390,8 @@ void *qcom_register_ssr_notifier(const char *name, struct notifier_block *nb)
if (IS_ERR(info))
return info;
- srcu_notifier_chain_register(&info->notifier_list, nb);
+ if (srcu_notifier_chain_register(&info->notifier_list, nb))
+ pr_warn("SSR notifier already registered\n");
return &info->notifier_list;
}
@@ -673,7 +673,9 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
rproc_add_subdev(rproc, &sysmon->subdev);
sysmon->nb.notifier_call = sysmon_notify;
- blocking_notifier_chain_register(&sysmon_notifiers, &sysmon->nb);
+
+ if (blocking_notifier_chain_register(&sysmon_notifiers, &sysmon->nb))
+ pr_warn("sysmon notifier already registered\n");
mutex_lock(&sysmon_lock);
list_add(&sysmon->node, &sysmon_list);
@@ -2790,7 +2790,9 @@ static int rproc_panic_handler(struct notifier_block *nb, unsigned long event,
static void __init rproc_init_panic(void)
{
rproc_panic_nb.notifier_call = rproc_panic_handler;
- atomic_notifier_chain_register(&panic_notifier_list, &rproc_panic_nb);
+
+ if (atomic_notifier_chain_register(&panic_notifier_list, &rproc_panic_nb))
+ pr_warn("Remote Proc notifier already registered\n");
}
static void __exit rproc_exit_panic(void)