Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/powernv: Release the refcount for pci_dev

On PowerNV platform, we are holding an unnecessary refcount on a pci_dev, which
leads to the pci_dev is not destroyed when hotplugging a pci device.

This patch release the unnecessary refcount.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Wei Yang and committed by
Benjamin Herrenschmidt
4966bfa1 3f28c5af

-1
-1
arch/powerpc/platforms/powernv/pci-ioda.c
··· 343 343 pci_name(dev)); 344 344 continue; 345 345 } 346 - pci_dev_get(dev); 347 346 pdn->pcidev = dev; 348 347 pdn->pe_number = pe->pe_number; 349 348 pe->dma_weight += pnv_ioda_dma_weight(dev);