]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hotplug/cpcihp, fix pci device refcounting
authorJiri Slaby <jslaby@suse.cz>
Wed, 20 Jan 2010 13:15:54 +0000 (14:15 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 23 Feb 2010 00:17:02 +0000 (16:17 -0800)
commit109be89a5d1420adea4d86782ae36059e641c40f
tree5d967d0a3d4c81183c2782a1786cdcd0aedcd872
parentac2f6e909263961b1d29e71e60ac7a3fbac30335
PCI: hotplug/cpcihp, fix pci device refcounting

Stanse found an ommitted pci_dev_put on one error path in
cpcihp_generic_init. The path is taken on !dev, but also when
dev->hdr_type != PCI_HEADER_TYPE_BRIDGE. However it omits to
pci_dev_put on the latter.

As it is fine to pass NULL to pci_dev_put, put it in there
uncoditionally.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Scott Murray <scott@spiteful.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/cpcihp_generic.c