@@ -459,8 +459,10 @@ static struct notifier_block kernel_location_notifier = {
static int __init register_kernel_offset_dumper(void)
{
- atomic_notifier_chain_register(&panic_notifier_list,
- &kernel_location_notifier);
+ if (atomic_notifier_chain_register(&panic_notifier_list,
+ &kernel_location_notifier))
+ pr_warn("Kernel location notifier already registered\n");
+
return 0;
}
__initcall(register_kernel_offset_dumper);
@@ -196,7 +196,9 @@ static int __init reboot_setup(void)
}
timer_setup(&blink_timer, blink_timeout, 0);
- atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+
+ if (atomic_notifier_chain_register(&panic_notifier_list, &panic_block))
+ pr_warn("Panic notifier already registered\n");
return 0;
}
@@ -145,7 +145,9 @@ static __init int ip32_reboot_setup(void)
pm_power_off = ip32_machine_halt;
timer_setup(&blink_timer, blink_timeout, 0);
- atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+
+ if (atomic_notifier_chain_register(&panic_notifier_list, &panic_block))
+ pr_warn("Panic notifier already registered\n");
return 0;
}