提交 feb28979 编写于 作者: L Lorenzo Pieralisi 提交者: Bjorn Helgaas

of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources()

Commit d2be00c0 ("of/pci: Free resources on failure in
of_pci_get_host_bridge_resources()") fixed the error path so it frees
everything on the "resources" list.  That list includes the bus_range, so
we should not free it again.

Remove the superfluous free of bus_range.

[bhelgaas: changelog]
Fixes: d2be00c0 ("of/pci: Free resources on failure in of_pci_get_host_bridge_resources()")
Reported-by: NJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
CC: Rafael J. Wysocki <rjw@rjwysocki.net>
上级 87291235
......@@ -229,7 +229,6 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
resource_list_for_each_entry(window, resources)
kfree(window->res);
pci_free_resource_list(resources);
kfree(bus_range);
return err;
}
EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册