Commit ef62dfef authored by Yinghai Lu's avatar Yinghai Lu Committed by Jesse Barnes

PCI: Make add_to_list() return status

Will be used for resource_list_x duplication when trying
requested+optional at first.
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent a4ac9fea
...@@ -64,7 +64,7 @@ void pci_realloc(void) ...@@ -64,7 +64,7 @@ void pci_realloc(void)
* @add_size: additional size to be optionally added * @add_size: additional size to be optionally added
* to the resource * to the resource
*/ */
static void add_to_list(struct resource_list_x *head, static int add_to_list(struct resource_list_x *head,
struct pci_dev *dev, struct resource *res, struct pci_dev *dev, struct resource *res,
resource_size_t add_size, resource_size_t min_align) resource_size_t add_size, resource_size_t min_align)
{ {
...@@ -75,7 +75,7 @@ static void add_to_list(struct resource_list_x *head, ...@@ -75,7 +75,7 @@ static void add_to_list(struct resource_list_x *head,
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
if (!tmp) { if (!tmp) {
pr_warning("add_to_list: kmalloc() failed!\n"); pr_warning("add_to_list: kmalloc() failed!\n");
return; return -ENOMEM;
} }
tmp->next = ln; tmp->next = ln;
...@@ -87,6 +87,8 @@ static void add_to_list(struct resource_list_x *head, ...@@ -87,6 +87,8 @@ static void add_to_list(struct resource_list_x *head,
tmp->add_size = add_size; tmp->add_size = add_size;
tmp->min_align = min_align; tmp->min_align = min_align;
list->next = tmp; list->next = tmp;
return 0;
} }
static void add_to_failed_list(struct resource_list_x *head, static void add_to_failed_list(struct resource_list_x *head,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment