Skip to content
Commit 0bf01c3c authored by Jiri Slaby's avatar Jiri Slaby Committed by Jesse Barnes
Browse files

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: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Scott Murray <scott@spiteful.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 41a68a74
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment