diff options
-rw-r--r-- | drivers/of/of_pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c index 5751dc5b6494..ea7c2b6dfc56 100644 --- a/drivers/of/of_pci.c +++ b/drivers/of/of_pci.c | |||
@@ -223,8 +223,10 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, | |||
223 | } | 223 | } |
224 | 224 | ||
225 | err = of_pci_range_to_resource(&range, dev, res); | 225 | err = of_pci_range_to_resource(&range, dev, res); |
226 | if (err) | 226 | if (err) { |
227 | goto conversion_failed; | 227 | kfree(res); |
228 | continue; | ||
229 | } | ||
228 | 230 | ||
229 | if (resource_type(res) == IORESOURCE_IO) { | 231 | if (resource_type(res) == IORESOURCE_IO) { |
230 | if (!io_base) { | 232 | if (!io_base) { |