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>
This commit is contained in:
parent
5b9e3b6051
commit
7a4fa0a32c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue