ppc32: Fix typo/bug in bus resource allocation
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:
Signed-off-by Benjamin Herrenschmidt <[email protected]>
===== 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;