Skip to content

Commit

Permalink
i82875p_edac: Assign PCI resources before adding device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed May 30, 2014
1 parent 67d29b5 commit 06b0051
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/edac/i82875p_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 06b0051

Please sign in to comment.