diff options
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 6 |
1 files changed, 6 insertions, 0 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 |