]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: Fix refcount issue in pci_create_root_bus() error recovery path
authorJiang Liu <liuj97@gmail.com>
Thu, 6 Jun 2013 17:10:08 +0000 (01:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jul 2013 01:21:30 +0000 (18:21 -0700)
commit65a1fb23bc5b2f21b44f8b81c89ccda808b3b321
treeaa583a85d74a24d6012b9b02a2d60c08ee6a81a9
parentc723caeecf4240abbdafbc4ccd96ef08828a2d4f
PCI: Fix refcount issue in pci_create_root_bus() error recovery path

commit 343df771e671d821478dd3ef525a0610b808dbf8 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/probe.c