summaryrefslogtreecommitdiff
path: root/drivers/xen/unpopulated-alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/unpopulated-alloc.c')
-rw-r--r--drivers/xen/unpopulated-alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/xen/unpopulated-alloc.c b/drivers/xen/unpopulated-alloc.c
index e64e6befc63b..87e6b7db892f 100644
--- a/drivers/xen/unpopulated-alloc.c
+++ b/drivers/xen/unpopulated-alloc.c
@@ -39,8 +39,10 @@ static int fill_list(unsigned int nr_pages)
}
pgmap = kzalloc(sizeof(*pgmap), GFP_KERNEL);
- if (!pgmap)
+ if (!pgmap) {
+ ret = -ENOMEM;
goto err_pgmap;
+ }
pgmap->type = MEMORY_DEVICE_GENERIC;
pgmap->range = (struct range) {