diff options
Diffstat (limited to 'drivers/char/isicom.c')
| -rw-r--r-- | drivers/char/isicom.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index c1ab303455cf..98310e1aae30 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
| @@ -1573,11 +1573,16 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
| 1573 | dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device); | 1573 | dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device); |
| 1574 | 1574 | ||
| 1575 | /* allot the first empty slot in the array */ | 1575 | /* allot the first empty slot in the array */ |
| 1576 | for (index = 0; index < BOARD_COUNT; index++) | 1576 | for (index = 0; index < BOARD_COUNT; index++) { |
| 1577 | if (isi_card[index].base == 0) { | 1577 | if (isi_card[index].base == 0) { |
| 1578 | board = &isi_card[index]; | 1578 | board = &isi_card[index]; |
| 1579 | break; | 1579 | break; |
| 1580 | } | 1580 | } |
| 1581 | } | ||
| 1582 | if (index == BOARD_COUNT) { | ||
| 1583 | retval = -ENODEV; | ||
| 1584 | goto err_disable; | ||
| 1585 | } | ||
| 1581 | 1586 | ||
| 1582 | board->index = index; | 1587 | board->index = index; |
| 1583 | board->base = pci_resource_start(pdev, 3); | 1588 | board->base = pci_resource_start(pdev, 3); |
| @@ -1624,6 +1629,7 @@ errunrr: | |||
| 1624 | errdec: | 1629 | errdec: |
| 1625 | board->base = 0; | 1630 | board->base = 0; |
| 1626 | card_count--; | 1631 | card_count--; |
| 1632 | err_disable: | ||
| 1627 | pci_disable_device(pdev); | 1633 | pci_disable_device(pdev); |
| 1628 | err: | 1634 | err: |
| 1629 | return retval; | 1635 | return retval; |
