diff options
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, |