Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / kernel / notifier.c
index 6196af8..bfc95b3 100644 (file)
@@ -22,6 +22,7 @@ static int notifier_chain_register(struct notifier_block **nl,
                struct notifier_block *n)
 {
        while ((*nl) != NULL) {
+               WARN_ONCE(((*nl) == n), "double register detected");
                if (n->priority > (*nl)->priority)
                        break;
                nl = &((*nl)->next);