PCI: Fix refcount issue in pci_create_root_bus() error recovery path

After calling device_register(&bridge->dev), the bridge is reference-
counted, and it is illegal to call kfree() on it except in the release
function.

[bhelgaas: changelog, use put_device() after device_register() failure]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
This commit is contained in:
Jiang Liu 2013-06-07 01:10:08 +08:00 • committed by Bjorn Helgaas
commit 343df771e6