diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-01-21 05:08:18 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-14 11:44:51 -0500 |
commit | ef62dfefa93bc90f1cb0f4a55c2d86b3269b3f92 (patch) | |
tree | a29e759324b2331968a732db1312fafc75f3d737 /drivers/pci/setup-bus.c | |
parent | a4ac9fea016fc5c09227eb479bd35e34978323a4 (diff) |
PCI: Make add_to_list() return status
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>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 9d932f4e4f98..0282fde43951 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -64,7 +64,7 @@ void pci_realloc(void) | |||
64 | * @add_size: additional size to be optionally added | 64 | * @add_size: additional size to be optionally added |
65 | * to the resource | 65 | * to the resource |
66 | */ | 66 | */ |
67 | static void add_to_list(struct resource_list_x *head, | 67 | static int add_to_list(struct resource_list_x *head, |
68 | struct pci_dev *dev, struct resource *res, | 68 | struct pci_dev *dev, struct resource *res, |
69 | resource_size_t add_size, resource_size_t min_align) | 69 | resource_size_t add_size, resource_size_t min_align) |
70 | { | 70 | { |
@@ -75,7 +75,7 @@ static void add_to_list(struct resource_list_x *head, | |||
75 | tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); | 75 | tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); |
76 | if (!tmp) { | 76 | if (!tmp) { |
77 | pr_warning("add_to_list: kmalloc() failed!\n"); | 77 | pr_warning("add_to_list: kmalloc() failed!\n"); |
78 | return; | 78 | return -ENOMEM; |
79 | } | 79 | } |
80 | 80 | ||
81 | tmp->next = ln; | 81 | tmp->next = ln; |
@@ -87,6 +87,8 @@ static void add_to_list(struct resource_list_x *head, | |||
87 | tmp->add_size = add_size; | 87 | tmp->add_size = add_size; |
88 | tmp->min_align = min_align; | 88 | tmp->min_align = min_align; |
89 | list->next = tmp; | 89 | list->next = tmp; |
90 | |||
91 | return 0; | ||
90 | } | 92 | } |
91 | 93 | ||
92 | static void add_to_failed_list(struct resource_list_x *head, | 94 | static void add_to_failed_list(struct resource_list_x *head, |