diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-09-21 08:42:43 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-09-22 05:24:31 -0400 |
commit | 25f0c659fe64832d8ee06aa623fffaad708dcf8b (patch) | |
tree | b5740156ac2ce5e39aaaba32ddb21b03379abb48 /drivers/mtd/maps/lasat.c | |
parent | dd8e9ed6ed544e2b924429d29cd2a6b55590109b (diff) |
ioremap balanced with iounmap for drivers/mtd subsystem
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Tested (compilation only) with:
- allmodconfig
- Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to
make sure that the changed file is compiling without warning
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/maps/lasat.c')
-rw-r--r-- | drivers/mtd/maps/lasat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c index 1c13d2dc0cdf..e34376321050 100644 --- a/drivers/mtd/maps/lasat.c +++ b/drivers/mtd/maps/lasat.c | |||
@@ -79,6 +79,7 @@ static int __init init_lasat(void) | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | iounmap(lasat_map.virt); | ||
82 | return -ENXIO; | 83 | return -ENXIO; |
83 | } | 84 | } |
84 | 85 | ||
@@ -89,6 +90,7 @@ static void __exit cleanup_lasat(void) | |||
89 | map_destroy(lasat_mtd); | 90 | map_destroy(lasat_mtd); |
90 | } | 91 | } |
91 | if (lasat_map.virt) { | 92 | if (lasat_map.virt) { |
93 | iounmap(lasat_map.virt); | ||
92 | lasat_map.virt = 0; | 94 | lasat_map.virt = 0; |
93 | } | 95 | } |
94 | } | 96 | } |