summaryrefslogtreecommitdiff
path: root/drivers/of/of_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/of_pci.c')
-rw-r--r--drivers/of/of_pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c
index d0c8902dfbf4..ff27177f49ed 100644
--- a/drivers/of/of_pci.c
+++ b/drivers/of/of_pci.c
@@ -249,8 +249,10 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
}
err = of_pci_range_to_resource(&range, dev, res);
- if (err)
- goto conversion_failed;
+ if (err) {
+ kfree(res);
+ continue;
+ }
if (resource_type(res) == IORESOURCE_IO) {
if (!io_base) {