PCI: Fix reference count leak in pci_dev_present()
authorJiang Liu <jiang.liu@huawei.com>
Mon, 21 Jan 2013 21:20:45 +0000 (13:20 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Jan 2013 20:49:27 +0000 (13:49 -0700)
commitd5af7d987a494a1b85e176b4c33dc115cb111662
treeb4566d25bb2b102d4d4ae9138f6f4c26caea848d
parent7629d19a4df922e7497e170c1c7b508b5e27f486
PCI: Fix reference count leak in pci_dev_present()

Function pci_get_dev_by_id() takes a reference on the pci_dev returned, so
pci_dev_present() should release the corresponding reference.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/search.c