[PATCH] ppc32: Fix typo/bug in bus resource allocation

From: Benjamin Herrenschmidt
Date: Thu Sep 23 2004 - 20:25:59 EST


Hi !

The code re-allocating new bus resources in case of conflicts use a
function called probe_resource(), which has a typo (spotted by the
uninitialized variable use of gcc) causing it to potentially return
bogus results. This fixes it:

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

===== arch/ppc/kernel/pci.c 1.43 vs edited =====
--- 1.43/arch/ppc/kernel/pci.c 2004-08-26 16:43:07 +10:00
+++ edited/arch/ppc/kernel/pci.c 2004-09-24 11:08:49 +10:00
@@ -411,7 +411,7 @@
r = &dev->resource[i];
if (!r->flags || (r->flags & IORESOURCE_UNSET))
continue;
- if (pci_find_parent_resource(bus->self, r) != pr)
+ if (pci_find_parent_resource(dev, r) != pr)
continue;
if (r->end >= res->start && res->end >= r->start) {
*conflict = r;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/