Skip to contentSkip to conversation

ppc32: Fix typo/bug in bus resource allocation

PATCH New Benjamin Herrenschmidt 1 participant 1 message Sep 24, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: Fix typo/bug in bus resource allocation

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:

===== arch/ppc/kernel/pci.c 1.43 vs edited =====

arch/ppc/kernel/pci.c +1 -1
@@ -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;