diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-02 12:28:04 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-17 18:30:09 +0100 |
commit | 904e377744bfdcea276c27167fa6a609929f39dc (patch) | |
tree | 4dc05b84992a2c35a1933b5b12b44391e0cd4e08 /drivers/pcmcia/cs.c | |
parent | fa0b3bc504ff813cc05988bb30bbb6c6a0263eb4 (diff) | |
download | kernel_samsung_aries-904e377744bfdcea276c27167fa6a609929f39dc.zip kernel_samsung_aries-904e377744bfdcea276c27167fa6a609929f39dc.tar.gz kernel_samsung_aries-904e377744bfdcea276c27167fa6a609929f39dc.tar.bz2 |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 6d6f82b..96d8d25 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -407,6 +407,8 @@ static void socket_shutdown(struct pcmcia_socket *s) s->irq.AssignedIRQ = s->irq.Config = 0; s->lock_count = 0; destroy_cis_cache(s); + kfree(s->fake_cis); + s->fake_cis = NULL; #ifdef CONFIG_CARDBUS cb_free(s); #endif @@ -577,6 +579,8 @@ static int socket_late_resume(struct pcmcia_socket *skt) dev_dbg(&skt->dev, "cis mismatch - different card\n"); socket_remove_drivers(skt); destroy_cis_cache(skt); + kfree(skt->fake_cis); + skt->fake_cis = NULL; /* * Workaround: give DS time to schedule removal. * Remove me once the 100ms delay is eliminated |