From: Yinghai Lu Date: Tue, 7 May 2013 23:29:31 +0000 (-0700) Subject: i82875p_edac: Assign PCI resources before adding device X-Git-Tag: v3.16-rc1~29^2~3^4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06b00514b7f931eb94e3f56009ece8ae55488150;p=platform%2Fkernel%2Flinux-stable.git i82875p_edac: Assign PCI resources before adding device Assign PCI resources before pci_bus_add_device(). The resources must be assigned before a driver can claim the device. [bhelgaas: changelog] Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 8d0450b..f2b9ac9 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c @@ -293,13 +293,14 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev, if (dev == NULL) return 1; + pci_bus_assign_resources(dev->bus); + err = pci_bus_add_device(dev); if (err) { i82875p_printk(KERN_ERR, "%s(): pci_bus_add_device() Failed\n", __func__); } - pci_bus_assign_resources(dev->bus); } *ovrfl_pdev = dev;