diff options
Diffstat (limited to 'arch/powerpc/kernel/prom_parse.c')
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index a8099c806150..3934c227549b 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | |||
465 | if (parent == NULL) | 465 | if (parent == NULL) |
466 | return NULL; | 466 | return NULL; |
467 | bus = of_match_bus(parent); | 467 | bus = of_match_bus(parent); |
468 | if (strcmp(bus->name, "pci")) | 468 | if (strcmp(bus->name, "pci")) { |
469 | of_node_put(parent); | ||
469 | return NULL; | 470 | return NULL; |
471 | } | ||
470 | bus->count_cells(dev, &na, &ns); | 472 | bus->count_cells(dev, &na, &ns); |
471 | of_node_put(parent); | 473 | of_node_put(parent); |
472 | if (!OF_CHECK_COUNTS(na, ns)) | 474 | if (!OF_CHECK_COUNTS(na, ns)) |