xen/unpopulated-alloc: fix error return code in fill_list()

Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20210508021913.1727-1-thunder.leizhen@huawei.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Zhen Lei and committed by
Juergen Gross
dbc03e81 970655aa

+3 -1
+3 -1
drivers/xen/unpopulated-alloc.c
··· 39 39 } 40 40 41 41 pgmap = kzalloc(sizeof(*pgmap), GFP_KERNEL); 42 - if (!pgmap) 42 + if (!pgmap) { 43 + ret = -ENOMEM; 43 44 goto err_pgmap; 45 + } 44 46 45 47 pgmap->type = MEMORY_DEVICE_GENERIC; 46 48 pgmap->range = (struct range) {