diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-27 15:26:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-27 15:26:33 -0400 |
| commit | 9a457a524762edc1bb1ded65b7a75c01738632d5 (patch) | |
| tree | 19b8b7584abd26f1b3d2390fd5523af0182fad42 | |
| parent | bc5fbd9cc8b72ea591557c1277237a43c65ce775 (diff) | |
| parent | 40d24ff9b4309d37999bc0ae91a271f57651d9dd (diff) | |
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia: pd6729: Fix error path
pcmcia: preserve configuration information if request_io fails partly
| -rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 6 | ||||
| -rw-r--r-- | drivers/pcmcia/pd6729.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index a5c176598d95..9ba4dade69a4 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
| @@ -595,7 +595,13 @@ int pcmcia_request_io(struct pcmcia_device *p_dev) | |||
| 595 | if (c->io[1].end) { | 595 | if (c->io[1].end) { |
| 596 | ret = alloc_io_space(s, &c->io[1], p_dev->io_lines); | 596 | ret = alloc_io_space(s, &c->io[1], p_dev->io_lines); |
| 597 | if (ret) { | 597 | if (ret) { |
| 598 | struct resource tmp = c->io[0]; | ||
| 599 | /* release the previously allocated resource */ | ||
| 598 | release_io_space(s, &c->io[0]); | 600 | release_io_space(s, &c->io[0]); |
| 601 | /* but preserve the settings, for they worked... */ | ||
| 602 | c->io[0].end = resource_size(&tmp); | ||
| 603 | c->io[0].start = tmp.start; | ||
| 604 | c->io[0].flags = tmp.flags; | ||
| 599 | goto out; | 605 | goto out; |
| 600 | } | 606 | } |
| 601 | } else | 607 | } else |
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index b8a869af0f44..deef6656ab7b 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
| @@ -646,7 +646,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
| 646 | if (!pci_resource_start(dev, 0)) { | 646 | if (!pci_resource_start(dev, 0)) { |
| 647 | dev_warn(&dev->dev, "refusing to load the driver as the " | 647 | dev_warn(&dev->dev, "refusing to load the driver as the " |
| 648 | "io_base is NULL.\n"); | 648 | "io_base is NULL.\n"); |
| 649 | goto err_out_free_mem; | 649 | goto err_out_disable; |
| 650 | } | 650 | } |
| 651 | 651 | ||
| 652 | dev_info(&dev->dev, "Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx " | 652 | dev_info(&dev->dev, "Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx " |
