mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Cc: Alan Cox <[email protected]> Cc: Brent Casavant <[email protected]> Cc: Pat Gefre <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d9964d5c90
commit
f466413261
1 changed files with 3 additions and 0 deletions
|
|
@ -2685,6 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
|
|||
if (soft) {
|
||||
free_irq(control->ic_irq, soft);
|
||||
if (soft->is_ioc4_serial_addr) {
|
||||
iounmap(soft->is_ioc4_serial_addr);
|
||||
release_region((unsigned long)
|
||||
soft->is_ioc4_serial_addr,
|
||||
sizeof(struct ioc4_serial));
|
||||
|
|
@ -2887,6 +2888,8 @@ out4:
|
|||
out3:
|
||||
kfree(control);
|
||||
out2:
|
||||
if (serial)
|
||||
iounmap(serial);
|
||||
release_region(tmp_addr1, sizeof(struct ioc4_serial));
|
||||
out1:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue