Skip to content

Commit

Permalink
[PATCH] scx200_acb: handle PCI errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Nov 20, 2006
1 parent a6cd2d9 commit ffb3d13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,12 @@ static __init int scx200_create_pci(const char *text, struct pci_dev *pdev,
iface->pdev = pdev;
iface->bar = bar;

pci_enable_device_bars(iface->pdev, 1 << iface->bar);
rc = pci_enable_device_bars(iface->pdev, 1 << iface->bar);
if (rc)
goto errout_free;

rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name);

if (rc != 0) {
if (rc) {
printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n",
iface->bar);
goto errout_free;
Expand Down

0 comments on commit ffb3d13

Please sign in to comment.