From: Haavard Skinnemoen Date: Thu, 27 Mar 2008 14:24:12 +0000 (+0100) Subject: avr32: Fix bug in early resource allocation code X-Git-Tag: v2.6.25-rc8~74^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2a395256134a24d906d5e67e03e853c580b37ed;p=linux-2.6 avr32: Fix bug in early resource allocation code add_reserved_region() tries to keep the resource list sorted, so when looking for a place to insert the new resource, it may break out before the last entry. When this happens, the list is broken in two because the sibling field of the new entry doesn't point to the next resource. Fix it by updating the new resource's sibling field appropriately. Signed-off-by: Haavard Skinnemoen --- diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index e66a07a928..2687b730e2 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c @@ -163,6 +163,7 @@ add_reserved_region(resource_size_t start, resource_size_t end, new->start = start; new->end = end; new->name = name; + new->sibling = next; new->flags = IORESOURCE_MEM; *pprev = new;