Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189117
b: refs/heads/master
c: 966f3a7
h: refs/heads/master
i:
  189115: a0a9dc7
v: v3
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Mar 24, 2010
1 parent 2c9f249 commit 5e9980f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66f1207bce10fd80ee8ce99b67d617644612f05e
refs/heads/master: 966f3a7570447c5025d67a618d408e68a3ae3167
14 changes: 8 additions & 6 deletions trunk/drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand Down

0 comments on commit 5e9980f

Please sign in to comment.