]>
Commit | Line | Data |
---|---|---|
618190b8 SL |
1 | From 7845a494911f8a67f28059303e4d6b05fce4925d Mon Sep 17 00:00:00 2001 |
2 | From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |
3 | Date: Wed, 11 Feb 2015 04:58:35 +0000 | |
4 | Subject: of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources() | |
5 | ||
6 | [ Upstream commit feb28979c137ba3f649ad36fc27c85c64c111f78 ] | |
7 | ||
8 | Commit d2be00c0fb5a ("of/pci: Free resources on failure in | |
9 | of_pci_get_host_bridge_resources()") fixed the error path so it frees | |
10 | everything on the "resources" list. That list includes the bus_range, so | |
11 | we should not free it again. | |
12 | ||
13 | Remove the superfluous free of bus_range. | |
14 | ||
15 | [bhelgaas: changelog] | |
16 | Fixes: d2be00c0fb5a ("of/pci: Free resources on failure in of_pci_get_host_bridge_resources()") | |
17 | Reported-by: Jiang Liu <jiang.liu@linux.intel.com> | |
18 | Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |
19 | Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | |
20 | CC: Rafael J. Wysocki <rjw@rjwysocki.net> | |
21 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
22 | --- | |
23 | drivers/of/of_pci.c | 1 - | |
24 | 1 file changed, 1 deletion(-) | |
25 | ||
26 | diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c | |
27 | index ecc5fa5640d2..8a74b1d399a1 100644 | |
28 | --- a/drivers/of/of_pci.c | |
29 | +++ b/drivers/of/of_pci.c | |
30 | @@ -229,7 +229,6 @@ parse_failed: | |
31 | list_for_each_entry(window, resources, list) | |
32 | kfree(window->res); | |
33 | pci_free_resource_list(resources); | |
34 | - kfree(bus_range); | |
35 | return err; | |
36 | } | |
37 | EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources); | |
38 | -- | |
39 | 2.17.1 | |
40 |