summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/au1000_generic.c
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-10-20 14:44:18 -0700
committerDominik Brodowski <linux@dominikbrodowski.net>2006-10-25 21:59:43 -0400
commit3efa9970bd0ac731302224ab9243693e91bc4bea (patch)
treead915a88d7e7e027deeb989e25b387ced29f4d45 /drivers/pcmcia/au1000_generic.c
parenta230a6785dd5af84b8b043a64d8df8adc81f3724 (diff)
downloadop-kernel-dev-3efa9970bd0ac731302224ab9243693e91bc4bea.zip
op-kernel-dev-3efa9970bd0ac731302224ab9243693e91bc4bea.tar.gz
[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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c
index 5387de6..551bde5 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);
}
OpenPOWER on IntegriCloud