From 7a4fa0a32cf11a0686804afffbcd02827c846fcf Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 5 Feb 2014 23:38:29 +0100 Subject: lib/memrange: Skip 0-sized resources. Change-Id: I44194153817b8e6b641e407fc4a9e0fd5bc3f318 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/5152 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/lib/memrange.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib') diff --git a/src/lib/memrange.c b/src/lib/memrange.c index 0ebac0534e..7fb6ef7b06 100644 --- a/src/lib/memrange.c +++ b/src/lib/memrange.c @@ -258,6 +258,9 @@ static void collect_ranges(void *gp, struct device *dev, struct resource *res) { struct collect_context *ctx = gp; + if (res->size == 0) + return; + memranges_insert(ctx->ranges, res->base, res->size, ctx->tag); } -- cgit v1.2.3