diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2018-03-02 17:44:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-03-02 17:44:39 -0800
commit329ad5e5445955b9de3438061303fdfbd03173de (patch)
parentMerge branch 'parisc-4.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux (diff)
parentPCI: Allow release of resources that were never assigned (diff)
Merge tag 'pci-v4.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: - Update pci.ids location (documentation only) (Randy Dunlap) - Fix a crash when BIOS didn't assign a BAR and we try to enlarge it (Christian K├Ânig) * tag 'pci-v4.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Allow release of resources that were never assigned PCI: Update location of pci.ids file
2 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 611a75e4366e..badb26ac33dc 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -570,7 +570,9 @@ your driver if they're helpful, or just use plain hex constants.
The device IDs are arbitrary hex numbers (vendor controlled) and normally used
only in a single location, the pci_device_id table.
-Please DO submit new vendor/device IDs to http://pciids.sourceforge.net/.
+Please DO submit new vendor/device IDs to http://pci-ids.ucw.cz/.
+There are mirrors of the pci.ids file at http://pciids.sourceforge.net/
+and https://github.com/pciutils/pciids.
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 369d48d6c6f1..365447240d95 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -401,6 +401,10 @@ void pci_release_resource(struct pci_dev *dev, int resno)
struct resource *res = dev->resource + resno;
pci_info(dev, "BAR %d: releasing %pR\n", resno, res);
+ if (!res->parent)
+ return;
res->end = resource_size(res) - 1;
res->start = 0;