/* hibernate_nvs_alloc - allocate memory necessary for saving NVS regions  */
int hibernate_nvs_alloc(void)
/* hibernate_nvs_alloc - allocate memory necessary for saving NVS regions  */
int hibernate_nvs_alloc(void)
{
	struct nvs_page *entry;
	list_for_each_entry(entry, &nvs_list, node) {
		entry->data = (void *)__get_free_page(GFP_KERNEL);
		if (!entry->data) {
			hibernate_nvs_free();
			return -ENOMEM;
		}
	}
	return 0;
}