diff options
| author | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
|---|---|---|
| committer | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
| commit | a36bf32e9e8a86f291f746b7f8292e042ee04a46 (patch) | |
| tree | c5c999baa4c214218e3adea9b336cbd9f23950ad /drivers/pci/setup-res.c | |
| parent | bc078e4eab65f11bbaeed380593ab8151b30d703 (diff) | |
| parent | 01bf0b64579ead8a82e7cfc32ae44bc667e7ad0f (diff) | |
Merge commit 'v2.6.34-rc5' into oprofile/core
Diffstat (limited to 'drivers/pci/setup-res.c')
| -rw-r--r-- | drivers/pci/setup-res.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 7d678bb15ffb..17bed18d24ad 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -93,8 +93,7 @@ void pci_update_resource(struct pci_dev *dev, int resno) int pci_claim_resource(struct pci_dev *dev, int resource) { struct resource *res = &dev->resource[resource]; - struct resource *root; - int err; + struct resource *root, *conflict; root = pci_find_parent_resource(dev, res); if (!root) { @@ -103,12 +102,15 @@ int pci_claim_resource(struct pci_dev *dev, int resource) return -EINVAL; } - err = request_resource(root, res); - if (err) + conflict = request_resource_conflict(root, res); + if (conflict) { dev_err(&dev->dev, - "address space collision: %pR already in use\n", res); + "address space collision: %pR conflicts with %s %pR\n", + res, conflict->name, conflict); + return -EBUSY; + } - return err; + return 0; } EXPORT_SYMBOL(pci_claim_resource); |
