]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/prom_parse.c
powerpc: Fix goof in 6xx and POWER4 idle power-save functions
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / prom_parse.c
index a8099c806150618e34dab60d7f7df036aa9eed29..3934c227549b07a1f08ba59c86ac497ce6c0a45f 100644 (file)
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
        if (parent == NULL)
                return NULL;
        bus = of_match_bus(parent);
-       if (strcmp(bus->name, "pci"))
+       if (strcmp(bus->name, "pci")) {
+               of_node_put(parent);
                return NULL;
+       }
        bus->count_cells(dev, &na, &ns);
        of_node_put(parent);
        if (!OF_CHECK_COUNTS(na, ns))