From: Wei Yang Date: Wed, 23 Apr 2014 02:26:33 +0000 (+0800) Subject: powerpc/powernv: Release the refcount for pci_dev X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4966bfa1b3347ee75e6d93859a2e8ce9a662390c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 1d992f137c48..98824aa99173 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -343,7 +343,6 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe) pci_name(dev)); continue; } - pci_dev_get(dev); pdn->pcidev = dev; pdn->pe_number = pe->pe_number; pe->dma_weight += pnv_ioda_dma_weight(dev);