Commit 0dd3a3bc authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

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

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0775cc5c
...@@ -412,7 +412,7 @@ probe_resource(struct pci_bus *parent, struct resource *pr, ...@@ -412,7 +412,7 @@ probe_resource(struct pci_bus *parent, struct resource *pr,
r = &dev->resource[i]; r = &dev->resource[i];
if (!r->flags || (r->flags & IORESOURCE_UNSET)) if (!r->flags || (r->flags & IORESOURCE_UNSET))
continue; continue;
if (pci_find_parent_resource(bus->self, r) != pr) if (pci_find_parent_resource(dev, r) != pr)
continue; continue;
if (r->end >= res->start && res->end >= r->start) { if (r->end >= res->start && res->end >= r->start) {
*conflict = r; *conflict = r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment