aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.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/cs.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/cs.c')
-rw-r--r--drivers/pcmcia/cs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 6d6f82b38a68..96d8d25c209d 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -407,6 +407,8 @@ static void socket_shutdown(struct pcmcia_socket *s)
407 s->irq.AssignedIRQ = s->irq.Config = 0; 407 s->irq.AssignedIRQ = s->irq.Config = 0;
408 s->lock_count = 0; 408 s->lock_count = 0;
409 destroy_cis_cache(s); 409 destroy_cis_cache(s);
410 kfree(s->fake_cis);
411 s->fake_cis = NULL;
410#ifdef CONFIG_CARDBUS 412#ifdef CONFIG_CARDBUS
411 cb_free(s); 413 cb_free(s);
412#endif 414#endif
@@ -577,6 +579,8 @@ static int socket_late_resume(struct pcmcia_socket *skt)
577 dev_dbg(&skt->dev, "cis mismatch - different card\n"); 579 dev_dbg(&skt->dev, "cis mismatch - different card\n");
578 socket_remove_drivers(skt); 580 socket_remove_drivers(skt);
579 destroy_cis_cache(skt); 581 destroy_cis_cache(skt);
582 kfree(skt->fake_cis);
583 skt->fake_cis = NULL;
580 /* 584 /*
581 * Workaround: give DS time to schedule removal. 585 * Workaround: give DS time to schedule removal.
582 * Remove me once the 100ms delay is eliminated 586 * Remove me once the 100ms delay is eliminated