summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_common.c
diff options
context:
space:
mode:
authorDavid S. Miller2006-02-15 01:44:39 +0100
committerDavid S. Miller2006-03-20 10:12:58 +0100
commit355db99860a1d77d77cd2fc66e2f5ab58f3e0995 (patch)
tree325c43f5f1820d9f17f46f330f061a5b65259421 /arch/sparc64/kernel/pci_common.c
parent[SPARC64]: Restrict PCI bus scanning on SUN4V. (diff)
downloadkernel-qcow2-linux-355db99860a1d77d77cd2fc66e2f5ab58f3e0995.tar.gz
kernel-qcow2-linux-355db99860a1d77d77cd2fc66e2f5ab58f3e0995.tar.xz
kernel-qcow2-linux-355db99860a1d77d77cd2fc66e2f5ab58f3e0995.zip
[SPARC64]: Explicitly init *nregs to 0 in find_device_prom_node().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r--arch/sparc64/kernel/pci_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 1b1f89b35f67..b2d21b11a232 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -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) {