mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
PCI: Remove stray put_device() in pci_register_host_bridge()
This put_device() was accidentally left over from when we changed the code
from using device_register() to calling device_add(). Delete it.
Link: https://lore.kernel.org/r/55b24870-89fb-4c91-b85d-744e35db53c2@stanley.mountain
Fixes: 9885440b16 ("PCI: Fix pci_host_bridge struct device release/free handling")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
1f2768b6a3
commit
6e8d06e509
|
|
@ -996,10 +996,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
|||
/* Temporarily move resources off the list */
|
||||
list_splice_init(&bridge->windows, &resources);
|
||||
err = device_add(&bridge->dev);
|
||||
if (err) {
|
||||
put_device(&bridge->dev);
|
||||
if (err)
|
||||
goto free;
|
||||
}
|
||||
|
||||
bus->bridge = get_device(&bridge->dev);
|
||||
device_enable_async_suspend(bus->bridge);
|
||||
pci_set_bus_of_node(bus);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user