return -ENOMEM;
/* page table is no longer needed after mapping, let's free */
- vfree(fw_priv->pages);
+ kvfree(fw_priv->pages);
fw_priv->pages = NULL;
return 0;
fw_priv->page_array_size * 2);
struct page **new_pages;
- new_pages = vmalloc(array_size(new_array_size, sizeof(void *)));
+ new_pages = kvmalloc_array(new_array_size, sizeof(void *),
+ GFP_KERNEL);
if (!new_pages) {
fw_load_abort(fw_sysfs);
return -ENOMEM;
fw_priv->page_array_size * sizeof(void *));
memset(&new_pages[fw_priv->page_array_size], 0, sizeof(void *) *
(new_array_size - fw_priv->page_array_size));
- vfree(fw_priv->pages);
+ kvfree(fw_priv->pages);
fw_priv->pages = new_pages;
fw_priv->page_array_size = new_array_size;
}
for (i = 0; i < fw_priv->nr_pages; i++)
__free_page(fw_priv->pages[i]);
- vfree(fw_priv->pages);
+ kvfree(fw_priv->pages);
fw_priv->pages = NULL;
fw_priv->page_array_size = 0;
fw_priv->nr_pages = 0;