summaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-bus.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-01-21 02:08:18 -0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-02-14 08:44:51 -0800
commitef62dfefa93bc90f1cb0f4a55c2d86b3269b3f92 (patch)
treea29e759324b2331968a732db1312fafc75f3d737 /drivers/pci/setup-bus.c
parenta4ac9fea016fc5c09227eb479bd35e34978323a4 (diff)
downloadop-kernel-dev-ef62dfefa93bc90f1cb0f4a55c2d86b3269b3f92.zip
op-kernel-dev-ef62dfefa93bc90f1cb0f4a55c2d86b3269b3f92.tar.gz
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 9d932f4..0282fde 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -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)
{
@@ -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;
@@ -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,
OpenPOWER on IntegriCloud