aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-02 06:28:04 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-01-17 12:30:09 -0500
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,
281 s->cis_virt = ioremap(res->start, s->map_size); 281 s->cis_virt = ioremap(res->start, s->map_size);
282 if (s->cis_virt) { 282 if (s->cis_virt) {
283 ret = pccard_validate_cis(s, count); 283 ret = pccard_validate_cis(s, count);
284 /* invalidate mapping and CIS cache */ 284 /* invalidate mapping */
285 iounmap(s->cis_virt); 285 iounmap(s->cis_virt);
286 s->cis_virt = NULL; 286 s->cis_virt = NULL;
287 destroy_cis_cache(s);
288 } 287 }
289 s->cis_mem.res = NULL; 288 s->cis_mem.res = NULL;
290 if ((ret != 0) || (*count == 0)) 289 if ((ret != 0) || (*count == 0))