Skip to content

Commit

Permalink
PCI: Make add_to_list() return status
Browse files Browse the repository at this point in the history
Will be used for resource_list_x duplication when trying
requested+optional at first.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Feb 14, 2012
1 parent a4ac9fe commit ef62dfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void pci_realloc(void)
* @add_size: additional size to be optionally added
* 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,
resource_size_t add_size, resource_size_t min_align)
{
Expand All @@ -75,7 +75,7 @@ static void add_to_list(struct resource_list_x *head,
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
if (!tmp) {
pr_warning("add_to_list: kmalloc() failed!\n");
return;
return -ENOMEM;
}

tmp->next = ln;
Expand All @@ -87,6 +87,8 @@ static void add_to_list(struct resource_list_x *head,
tmp->add_size = add_size;
tmp->min_align = min_align;
list->next = tmp;

return 0;
}

static void add_to_failed_list(struct resource_list_x *head,
Expand Down

0 comments on commit ef62dfe

Please sign in to comment.