diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-02-05 23:38:29 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-02-06 00:55:06 +0100 |
commit | 7a4fa0a32cf11a0686804afffbcd02827c846fcf (patch) | |
tree | fa43fde87093d0f31eefd3cbafbf459c295c2519 /src/lib | |
parent | 5b9e3b60516d5255962604db7530089103f83ec1 (diff) | |
download | coreboot-7a4fa0a32cf11a0686804afffbcd02827c846fcf.tar.xz |
lib/memrange: Skip 0-sized resources.
Change-Id: I44194153817b8e6b641e407fc4a9e0fd5bc3f318
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/5152
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/memrange.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |