diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-20 23:44:18 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-26 03:59:43 +0200 |
commit | 3efa9970bd0ac731302224ab9243693e91bc4bea (patch) | |
tree | ad915a88d7e7e027deeb989e25b387ced29f4d45 /drivers/pcmcia/au1000_generic.c | |
parent | [PATCH] pcmcia: au1000_generic fix (diff) | |
download | linux-3efa9970bd0ac731302224ab9243693e91bc4bea.tar.xz linux-3efa9970bd0ac731302224ab9243693e91bc4bea.zip |
[PATCH] ioremap balanced with iounmap for drivers/pcmcia
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/au1000_generic.c')
-rw-r--r-- | drivers/pcmcia/au1000_generic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index 5387de6216fb..551bde5d9430 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c @@ -449,6 +449,16 @@ out_err: del_timer_sync(&skt->poll_timer); pcmcia_unregister_socket(&skt->socket); flush_scheduled_work(); + if (i == 0) { + iounmap(skt->virt_io + (u32)mips_io_port_base); + skt->virt_io = NULL; + } +#ifndef CONFIG_MIPS_XXS1500 + else { + iounmap(skt->virt_io + (u32)mips_io_port_base); + skt->virt_io = NULL; + } +#endif ops->hw_shutdown(skt); } |