diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-01 02:29:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:32 -0400 |
commit | f4664132613caf40bfbf17b7e0ab3340a8b8f526 (patch) | |
tree | 19de52077caafb9e0883418b8f95c8cb5301c577 /drivers | |
parent | d9964d5c9067fe58fecb7ba10b2de4771d2005d9 (diff) |
[PATCH] ioremap balanced with iounmap for drivers/serial/ioc4_serial.c
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>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Brent Casavant <bcasavan@sgi.com>
Cc: Pat Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/ioc4_serial.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 576ca1eaa2b6..5ec4716c99bf 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -2685,6 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd) | |||
2685 | if (soft) { | 2685 | if (soft) { |
2686 | free_irq(control->ic_irq, soft); | 2686 | free_irq(control->ic_irq, soft); |
2687 | if (soft->is_ioc4_serial_addr) { | 2687 | if (soft->is_ioc4_serial_addr) { |
2688 | iounmap(soft->is_ioc4_serial_addr); | ||
2688 | release_region((unsigned long) | 2689 | release_region((unsigned long) |
2689 | soft->is_ioc4_serial_addr, | 2690 | soft->is_ioc4_serial_addr, |
2690 | sizeof(struct ioc4_serial)); | 2691 | sizeof(struct ioc4_serial)); |
@@ -2887,6 +2888,8 @@ out4: | |||
2887 | out3: | 2888 | out3: |
2888 | kfree(control); | 2889 | kfree(control); |
2889 | out2: | 2890 | out2: |
2891 | if (serial) | ||
2892 | iounmap(serial); | ||
2890 | release_region(tmp_addr1, sizeof(struct ioc4_serial)); | 2893 | release_region(tmp_addr1, sizeof(struct ioc4_serial)); |
2891 | out1: | 2894 | out1: |
2892 | 2895 | ||