diff options
| -rw-r--r-- | drivers/pci/setup-res.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index b711fb7181e2..1898c7b47907 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
| @@ -100,16 +100,16 @@ int pci_claim_resource(struct pci_dev *dev, int resource) | |||
| 100 | { | 100 | { |
| 101 | struct resource *res = &dev->resource[resource]; | 101 | struct resource *res = &dev->resource[resource]; |
| 102 | struct resource *root; | 102 | struct resource *root; |
| 103 | char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; | ||
| 104 | int err; | 103 | int err; |
| 105 | 104 | ||
| 106 | root = pci_find_parent_resource(dev, res); | 105 | root = pci_find_parent_resource(dev, res); |
| 107 | 106 | ||
| 108 | err = -EINVAL; | 107 | err = -EINVAL; |
| 109 | if (root != NULL) | 108 | if (root != NULL) |
| 110 | err = insert_resource(root, res); | 109 | err = request_resource(root, res); |
| 111 | 110 | ||
| 112 | if (err) { | 111 | if (err) { |
| 112 | const char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; | ||
| 113 | dev_err(&dev->dev, "BAR %d: %s of %s %pR\n", | 113 | dev_err(&dev->dev, "BAR %d: %s of %s %pR\n", |
| 114 | resource, | 114 | resource, |
| 115 | root ? "address space collision on" : | 115 | root ? "address space collision on" : |
