diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-11-19 07:19:39 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-20 18:42:05 +0100 |
commit | ffb3d1348605816de10d4e57281e02f606508b6c (patch) | |
tree | 60f4962a9f864d169961157cf00da6590a5e59a9 /drivers | |
parent | [PATCH] i2c-ixp4xx: fix ") != 0))" typo (diff) | |
download | linux-ffb3d1348605816de10d4e57281e02f606508b6c.tar.xz linux-ffb3d1348605816de10d4e57281e02f606508b6c.zip |
[PATCH] scx200_acb: handle PCI errors
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 32aab0d34ee9..714bae780953 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -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; |