summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2009-08-28 12:48:02 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-08-28 12:48:02 +0000
commit18c585b78a82c217ea32a8d529fde56b117630cc (patch)
tree326e36b92af28ea242e9a10807c1760dcd08dc5f /src/devices
parentd5f9f0024d4de97401871069eb462f53896d5269 (diff)
downloadcoreboot-18c585b78a82c217ea32a8d529fde56b117630cc.tar.xz
The resource allocator complained about 0-sized fixed
resources before actually validating if the resource is a fixed one. No harm done, except some confusion of the user (in this case: me). Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4606 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/device.c b/src/devices/device.c
index 58c247f212..3b97c86248 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -556,14 +556,14 @@ static void constrain_resources(struct device *dev, struct constraints* limits)
/* Constrain limits based on the fixed resources of this device. */
for (i = 0; i < dev->resources; i++) {
res = &dev->resource[i];
+ if (!(res->flags & IORESOURCE_FIXED))
+ continue;
if (!res->size) {
/* It makes no sense to have 0-sized, fixed resources.*/
printk_err("skipping %s@%lx fixed resource, size=0!\n",
dev_path(dev), res->index);
continue;
}
- if (!(res->flags & IORESOURCE_FIXED))
- continue;
/* PREFETCH, MEM, or I/O - skip any others. */
if ((res->flags & MEM_MASK) == PREF_TYPE)