]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[SPARC64]: Explicitly init *nregs to 0 in find_device_prom_node().
authorDavid S. Miller <davem@sunset.davemloft.net>
Wed, 15 Feb 2006 00:44:39 +0000 (16:44 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:12:58 +0000 (01:12 -0800)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/pci_common.c

index 1b1f89b35f670c49f97e10f3595d3610132786b4..b2d21b11a2328be1edddb2ee82e394867a951040 100644 (file)
@@ -39,6 +39,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
 {
        int node;
 
+       *nregs = 0;
+
        /*
         * Return the PBM's PROM node in case we are it's PCI device,
         * as the PBM's reg property is different to standard PCI reg
@@ -51,10 +53,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
             pdev->device == PCI_DEVICE_ID_SUN_SCHIZO ||
             pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO ||
             pdev->device == PCI_DEVICE_ID_SUN_SABRE ||
-            pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD)) {
-               *nregs = 0;
+            pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD))
                return bus_prom_node;
-       }
 
        node = prom_getchild(bus_prom_node);
        while (node != 0) {