numa: handle mmaped memory allocation failure correctly
commitc3ba3095070728f9c247f9e89652b9ea3f94319f
authorIgor Mammedov <imammedo@redhat.com>
Tue, 17 Jun 2014 10:17:05 +0000 (17 12:17 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Jun 2014 15:44:22 +0000 (19 18:44 +0300)
treebe4053d7b94cc130a98a3cd60b1285b46aaa69dd
parentdc61b2953121bf3656cd79efd4f2437dacfd6d8a
numa: handle mmaped memory allocation failure correctly

when memory_region_init_ram_from_file() fails
memory_region_size() will still return size that was
provided at region init time.
Instead use errp to properly detect error condition.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
numa.c