diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-05-07 16:29:31 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-05-30 10:56:46 -0600 |
commit | 06b00514b7f931eb94e3f56009ece8ae55488150 (patch) | |
tree | 039f7ddc084a9b5892fb95a858b75143a2fe5363 /drivers/edac | |
parent | 67d29b5c6c40e91b124695e9250c2fd24915e24a (diff) | |
download | linux-06b00514b7f931eb94e3f56009ece8ae55488150.tar.bz2 |
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 <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i82875p_edac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 8d0450b9b9af..f2b9ac9ed9f3 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; |