Commit 355db998 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Explicitly init *nregs to 0 in find_device_prom_node().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 987b6de7
...@@ -39,6 +39,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm, ...@@ -39,6 +39,8 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
{ {
int node; int node;
*nregs = 0;
/* /*
* Return the PBM's PROM node in case we are it's PCI device, * 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 * 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, ...@@ -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_SCHIZO ||
pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO || pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO ||
pdev->device == PCI_DEVICE_ID_SUN_SABRE || pdev->device == PCI_DEVICE_ID_SUN_SABRE ||
pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD)) { pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD))
*nregs = 0;
return bus_prom_node; return bus_prom_node;
}
node = prom_getchild(bus_prom_node); node = prom_getchild(bus_prom_node);
while (node != 0) { while (node != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment