summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-02 12:28:04 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2010-01-17 18:30:09 +0100
commit904e377744bfdcea276c27167fa6a609929f39dc (patch)
tree4dc05b84992a2c35a1933b5b12b44391e0cd4e08 /drivers/pcmcia/rsrc_nonstatic.c
parentfa0b3bc504ff813cc05988bb30bbb6c6a0263eb4 (diff)
pcmcia: validate CIS, not CIS cache.
In pccard_validate_cis(), validate the card CIS, not the CIS cache. Also, destroy the CIS cache if pccard_validate_cis fails. Furthermore, do not remove the fake CIS in destroy_cis_cache() but do so explicitely in the code paths where it makes sense. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 4f93889301b6..b886385f12e2 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -281,10 +281,9 @@ static int readable(struct pcmcia_socket *s, struct resource *res,
s->cis_virt = ioremap(res->start, s->map_size);
if (s->cis_virt) {
ret = pccard_validate_cis(s, count);
- /* invalidate mapping and CIS cache */
+ /* invalidate mapping */
iounmap(s->cis_virt);
s->cis_virt = NULL;
- destroy_cis_cache(s);
}
s->cis_mem.res = NULL;
if ((ret != 0) || (*count == 0))