]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/firewire/fw-topology.c
firewire: warn on fatal condition in topology code
[linux-2.6-omap-h63xx.git] / drivers / firewire / fw-topology.c
index 172c1867e9aa358c19cbb47afa85478a448ef510..d2c7a3d7e1cbb7711e8c76af6a76f448ea9d59f1 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/wait.h>
 #include <linux/errno.h>
+#include <asm/bug.h>
 #include <asm/system.h>
 #include "fw-transaction.h"
 #include "fw-topology.h"
@@ -383,6 +384,7 @@ void fw_destroy_nodes(struct fw_card *card)
        card->color++;
        if (card->local_node != NULL)
                for_each_fw_node(card, card->local_node, report_lost_node);
+       card->local_node = NULL;
        spin_unlock_irqrestore(&card->lock, flags);
 }
 
@@ -423,8 +425,8 @@ update_tree(struct fw_card *card, struct fw_node *root)
        node1 = fw_node(list1.next);
 
        while (&node0->link != &list0) {
+               WARN_ON(node0->port_count != node1->port_count);
 
-               /* assert(node0->port_count == node1->port_count); */
                if (node0->link_on && !node1->link_on)
                        event = FW_NODE_LINK_OFF;
                else if (!node0->link_on && node1->link_on)